UNPKG

421 BTypeScriptView Raw
1import { Noop } from '../types';
2export type Observer<T> = {
3 next: (value: T) => void;
4};
5export type Subscription = {
6 unsubscribe: Noop;
7};
8export type Subject<T> = {
9 readonly observers: Observer<T>[];
10 subscribe: (value: Observer<T>) => Subscription;
11 unsubscribe: Noop;
12} & Observer<T>;
13declare const _default: <T>() => Subject<T>;
14export default _default;
15//# sourceMappingURL=createSubject.d.ts.map
\No newline at end of file