Debian Codegraph @

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

raw
1 import { createErrorClass } from './createErrorClass';
2
3 export interface ObjectUnsubscribedError extends Error {}
4
5 export interface ObjectUnsubscribedErrorCtor {
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 (): ObjectUnsubscribedError;
11 }
12
13 /**
14 * An error thrown when an action is invalid because the object has been
15 * unsubscribed.
16 *
17 * @see {@link Subject}
18 * @see {@link BehaviorSubject}
19 *
20 * @class ObjectUnsubscribedError
21 */
22 export const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(
23 (_super) =>
24 function ObjectUnsubscribedErrorImpl(this: any) {
25 _super(this);
26 this.name = 'ObjectUnsubscribedError';
27 this.message = 'object unsubscribed';
28 }
29 );