Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
643 bytes
|
Line | |
---|
1 | export interface EmptyError extends Error {
|
---|
2 | }
|
---|
3 |
|
---|
4 | export interface EmptyErrorCtor {
|
---|
5 | new(): EmptyError;
|
---|
6 | }
|
---|
7 |
|
---|
8 | const EmptyErrorImpl = (() => {
|
---|
9 | function EmptyErrorImpl(this: any) {
|
---|
10 | Error.call(this);
|
---|
11 | this.message = 'no elements in sequence';
|
---|
12 | this.name = 'EmptyError';
|
---|
13 | return this;
|
---|
14 | }
|
---|
15 |
|
---|
16 | EmptyErrorImpl.prototype = Object.create(Error.prototype);
|
---|
17 |
|
---|
18 | return EmptyErrorImpl;
|
---|
19 | })();
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * An error thrown when an Observable or a sequence was queried but has no
|
---|
23 | * elements.
|
---|
24 | *
|
---|
25 | * @see {@link first}
|
---|
26 | * @see {@link last}
|
---|
27 | * @see {@link single}
|
---|
28 | *
|
---|
29 | * @class EmptyError
|
---|
30 | */
|
---|
31 | export const EmptyError: EmptyErrorCtor = EmptyErrorImpl as any; |
---|
Note:
See
TracBrowser
for help on using the repository browser.