Debian Codegraph @

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

raw
1 import { createErrorClass } from './createErrorClass';
2
3 export interface SequenceError extends Error {}
4
5 export interface SequenceErrorCtor {
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): SequenceError;
11 }
12
13 /**
14 * An error thrown when something is wrong with the sequence of
15 * values arriving on the observable.
16 *
17 * @see {@link operators/single}
18 */
19 export const SequenceError: SequenceErrorCtor = createErrorClass(
20 (_super) =>
21 function SequenceErrorImpl(this: any, message: string) {
22 _super(this);
23 this.name = 'SequenceError';
24 this.message = message;
25 }
26 );