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.

never.d.ts 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. import { Observable } from '../Observable';
  2. /**
  3. * An Observable that emits no items to the Observer and never completes.
  4. *
  5. * ![](never.png)
  6. *
  7. * A simple Observable that emits neither values nor errors nor the completion
  8. * notification. It can be used for testing purposes or for composing with other
  9. * Observables. Please note that by never emitting a complete notification, this
  10. * Observable keeps the subscription from being disposed automatically.
  11. * Subscriptions need to be manually disposed.
  12. *
  13. * ## Example
  14. * ### Emit the number 7, then never emit anything else (not even complete)
  15. * ```javascript
  16. * function info() {
  17. * console.log('Will not be called');
  18. * }
  19. * const result = NEVER.pipe(startWith(7));
  20. * result.subscribe(x => console.log(x), info, info);
  21. *
  22. * ```
  23. *
  24. * @see {@link Observable}
  25. * @see {@link index/EMPTY}
  26. * @see {@link of}
  27. * @see {@link throwError}
  28. */
  29. export declare const NEVER: Observable<never>;
  30. /**
  31. * @deprecated Deprecated in favor of using {@link NEVER} constant.
  32. */
  33. export declare function never(): Observable<never>;