//
//  YSRACSubject.h
//  ReactiveObjC
//
//  Created by Josh Abernathy on 3/9/12.
//  Copyright (c) 2012 GitHub, Inc. All rights reserved.
//

#import "YSRACSignal.h"
#import "YSRACSubscriber.h"

NS_ASSUME_NONNULL_BEGIN

/// A subject can be thought of as a signal that you can manually control by
/// sending next, completed, and error.
///
/// They're most helpful in bridging the non-YSRAC world to YSRAC, since they let you
/// manually control the sending of events.
@interface YSRACSubject<ValueType> : YSRACSignal<ValueType> <YSRACSubscriber>

/// Returns a new subject.
+ (instancetype)subject;

// Redeclaration of the YSRACSubscriber method. Made in order to specify a generic type.
- (void)sendNext:(nullable ValueType)value;

@end

NS_ASSUME_NONNULL_END
