aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/rxjs/src/internal/util/NotFoundError.ts
blob: ecd213fd3ae2535ef33a5af2ab35331a3b7ef29d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { createErrorClass } from './createErrorClass';

export interface NotFoundError extends Error {}

export interface NotFoundErrorCtor {
  /**
   * @deprecated Internal implementation detail. Do not construct error instances.
   * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
   */
  new (message: string): NotFoundError;
}

/**
 * An error thrown when a value or values are missing from an
 * observable sequence.
 *
 * @see {@link operators/single}
 */
export const NotFoundError: NotFoundErrorCtor = createErrorClass(
  (_super) =>
    function NotFoundErrorImpl(this: any, message: string) {
      _super(this);
      this.name = 'NotFoundError';
      this.message = message;
    }
);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage