Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Subject.d.ts 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { Operator } from './Operator';
  2. import { Observable } from './Observable';
  3. import { Subscriber } from './Subscriber';
  4. import { Subscription } from './Subscription';
  5. import { Observer, SubscriptionLike, TeardownLogic } from './types';
  6. /**
  7. * @class SubjectSubscriber<T>
  8. */
  9. export declare class SubjectSubscriber<T> extends Subscriber<T> {
  10. protected destination: Subject<T>;
  11. constructor(destination: Subject<T>);
  12. }
  13. /**
  14. * A Subject is a special type of Observable that allows values to be
  15. * multicasted to many Observables. Subjects are like EventEmitters.
  16. *
  17. * Every Subject is an Observable and an Observer. You can subscribe to a
  18. * Subject, and you can call next to feed values as well as error and complete.
  19. *
  20. * @class Subject<T>
  21. */
  22. export declare class Subject<T> extends Observable<T> implements SubscriptionLike {
  23. observers: Observer<T>[];
  24. closed: boolean;
  25. isStopped: boolean;
  26. hasError: boolean;
  27. thrownError: any;
  28. constructor();
  29. /**@nocollapse */
  30. static create: Function;
  31. lift<R>(operator: Operator<T, R>): Observable<R>;
  32. next(value?: T): void;
  33. error(err: any): void;
  34. complete(): void;
  35. unsubscribe(): void;
  36. /** @deprecated This is an internal implementation detail, do not use. */
  37. _trySubscribe(subscriber: Subscriber<T>): TeardownLogic;
  38. /** @deprecated This is an internal implementation detail, do not use. */
  39. _subscribe(subscriber: Subscriber<T>): Subscription;
  40. /**
  41. * Creates a new Observable with this Subject as the source. You can do this
  42. * to create customize Observer-side logic of the Subject and conceal it from
  43. * code that uses the Observable.
  44. * @return {Observable} Observable that the Subject casts to
  45. */
  46. asObservable(): Observable<T>;
  47. }
  48. /**
  49. * @class AnonymousSubject<T>
  50. */
  51. export declare class AnonymousSubject<T> extends Subject<T> {
  52. protected destination?: Observer<T>;
  53. constructor(destination?: Observer<T>, source?: Observable<T>);
  54. next(value: T): void;
  55. error(err: any): void;
  56. complete(): void;
  57. /** @deprecated This is an internal implementation detail, do not use. */
  58. _subscribe(subscriber: Subscriber<T>): Subscription;
  59. }