abcd6134c65d95d89275a4ef5b4e43d7cb4e971db17a9634023d3bb6b1fde4ac5b32c0457175d79e5752fffbe34ac9044789418133d82486a9035eed21c54e 726 B

1234567891011121314151617181920212223242526
  1. import { createErrorClass } from './createErrorClass';
  2. export interface NotFoundError extends Error {}
  3. export interface NotFoundErrorCtor {
  4. /**
  5. * @deprecated Internal implementation detail. Do not construct error instances.
  6. * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
  7. */
  8. new (message: string): NotFoundError;
  9. }
  10. /**
  11. * An error thrown when a value or values are missing from an
  12. * observable sequence.
  13. *
  14. * @see {@link operators/single}
  15. */
  16. export const NotFoundError: NotFoundErrorCtor = createErrorClass(
  17. (_super) =>
  18. function NotFoundErrorImpl(this: any, message: string) {
  19. _super(this);
  20. this.name = 'NotFoundError';
  21. this.message = message;
  22. }
  23. );