4e5e5d0845d0435747c7819336660e07156104bf774c1a3b53110b9cdfc42a5fee66592eee65ab84f58a3780461e669b8f316bbf1a743e22278a41f0664027 1.2 KB

12345678910111213141516171819202122232425262728
  1. import { MonoTypeOperatorFunction, ObservableInput } from '../types';
  2. /**
  3. * The {@link retry} operator configuration object. `retry` either accepts a `number`
  4. * or an object described by this interface.
  5. */
  6. export interface RetryConfig {
  7. /**
  8. * The maximum number of times to retry. If `count` is omitted, `retry` will try to
  9. * resubscribe on errors infinite number of times.
  10. */
  11. count?: number;
  12. /**
  13. * The number of milliseconds to delay before retrying, OR a function to
  14. * return a notifier for delaying. If a function is given, that function should
  15. * return a notifier that, when it emits will retry the source. If the notifier
  16. * completes _without_ emitting, the resulting observable will complete without error,
  17. * if the notifier errors, the error will be pushed to the result.
  18. */
  19. delay?: number | ((error: any, retryCount: number) => ObservableInput<any>);
  20. /**
  21. * Whether or not to reset the retry counter when the retried subscription
  22. * emits its first value.
  23. */
  24. resetOnSuccess?: boolean;
  25. }
  26. export declare function retry<T>(count?: number): MonoTypeOperatorFunction<T>;
  27. export declare function retry<T>(config: RetryConfig): MonoTypeOperatorFunction<T>;
  28. //# sourceMappingURL=retry.d.ts.map