Skip to content

Instantly share code, notes, and snippets.

@GarryBrown
Created June 18, 2020 11:24
Show Gist options
  • Save GarryBrown/925d0e7cf83ee2dbce855290487c0b53 to your computer and use it in GitHub Desktop.
Save GarryBrown/925d0e7cf83ee2dbce855290487c0b53 to your computer and use it in GitHub Desktop.
subscribe(observer?: PartialObserver<T>): Subscription;
subscribe(observerOrNext?: PartialObserver<T> | ((value: T) => void) | null,
error?: ((error: any) => void) | null,
complete?: (() => void) | null): Subscription {
const sink = toSubscriber(observerOrNext, error, complete);
sink.add(
this._subscribe(sink) // call fn wicth we pass to constructor
);
return sink;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment