Observer.d.ts 737 B

1234567891011121314151617181920212223242526
  1. export interface NextObserver<T> {
  2. closed?: boolean;
  3. next: (value: T) => void;
  4. error?: (err: any) => void;
  5. complete?: () => void;
  6. }
  7. export interface ErrorObserver<T> {
  8. closed?: boolean;
  9. next?: (value: T) => void;
  10. error: (err: any) => void;
  11. complete?: () => void;
  12. }
  13. export interface CompletionObserver<T> {
  14. closed?: boolean;
  15. next?: (value: T) => void;
  16. error?: (err: any) => void;
  17. complete: () => void;
  18. }
  19. export declare type PartialObserver<T> = NextObserver<T> | ErrorObserver<T> | CompletionObserver<T>;
  20. export interface Observer<T> {
  21. closed?: boolean;
  22. next: (value: T) => void;
  23. error: (err: any) => void;
  24. complete: () => void;
  25. }
  26. export declare const empty: Observer<any>;