Debian Codegraph @

node/rxjs/src/internal/util/NotFoundError.ts

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