4bc634cb3d24cedc69d24d386e9203a80dc79353ce788b74fb646af213a92e6b6c43863b46b1fbe64dabcc9c8e736c1225e6f5077ba1febded371c118fffc9 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { Subject } from '../Subject';
  2. import { Observable } from '../Observable';
  3. import { Subscription } from '../Subscription';
  4. /**
  5. * @class ConnectableObservable<T>
  6. * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.
  7. * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator
  8. * instead.
  9. * Details: https://rxjs.dev/deprecations/multicasting
  10. */
  11. export declare class ConnectableObservable<T> extends Observable<T> {
  12. source: Observable<T>;
  13. protected subjectFactory: () => Subject<T>;
  14. protected _subject: Subject<T> | null;
  15. protected _refCount: number;
  16. protected _connection: Subscription | null;
  17. /**
  18. * @param source The source observable
  19. * @param subjectFactory The factory that creates the subject used internally.
  20. * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.
  21. * `new ConnectableObservable(source, factory)` is equivalent to
  22. * `connectable(source, { connector: factory })`.
  23. * When the `refCount()` method is needed, the {@link share} operator should be used instead:
  24. * `new ConnectableObservable(source, factory).refCount()` is equivalent to
  25. * `source.pipe(share({ connector: factory }))`.
  26. * Details: https://rxjs.dev/deprecations/multicasting
  27. */
  28. constructor(source: Observable<T>, subjectFactory: () => Subject<T>);
  29. protected getSubject(): Subject<T>;
  30. protected _teardown(): void;
  31. /**
  32. * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead.
  33. * Details: https://rxjs.dev/deprecations/multicasting
  34. */
  35. connect(): Subscription;
  36. /**
  37. * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead.
  38. * Details: https://rxjs.dev/deprecations/multicasting
  39. */
  40. refCount(): Observable<T>;
  41. }
  42. //# sourceMappingURL=ConnectableObservable.d.ts.map