Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / src / internal / util / UnsubscriptionError.ts
1 export interface UnsubscriptionError extends Error {
2   readonly errors: any[];
3 }
4
5 export interface UnsubscriptionErrorCtor {
6   new(errors: any[]): UnsubscriptionError;
7 }
8
9 const UnsubscriptionErrorImpl = (() => {
10   function UnsubscriptionErrorImpl(this: any, errors: any[]) {
11     Error.call(this);
12     this.message = errors ?
13       `${errors.length} errors occurred during unsubscription:
14 ${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n  ')}` : '';
15     this.name = 'UnsubscriptionError';
16     this.errors = errors;
17     return this;
18   }
19
20   UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);
21
22   return UnsubscriptionErrorImpl;
23 })();
24
25 /**
26  * An error thrown when one or more errors have occurred during the
27  * `unsubscribe` of a {@link Subscription}.
28  */
29 export const UnsubscriptionError: UnsubscriptionErrorCtor = UnsubscriptionErrorImpl as any;