| 1 |
import { createErrorClass } from './createErrorClass'; |
| 2 |
|
| 3 |
export interface ArgumentOutOfRangeError extends Error {} |
| 4 |
|
| 5 |
export interface ArgumentOutOfRangeErrorCtor { |
| 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 (): ArgumentOutOfRangeError; |
| 11 |
} |
| 12 |
|
| 13 |
/** |
| 14 |
* An error thrown when an element was queried at a certain index of an |
| 15 |
* Observable, but no such index or position exists in that sequence. |
| 16 |
* |
| 17 |
* @see {@link elementAt} |
| 18 |
* @see {@link take} |
| 19 |
* @see {@link takeLast} |
| 20 |
*/ |
| 21 |
export const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor = createErrorClass( |
| 22 |
(_super) => |
| 23 |
function ArgumentOutOfRangeErrorImpl(this: any) { |
| 24 |
_super(this); |
| 25 |
this.name = 'ArgumentOutOfRangeError'; |
| 26 |
this.message = 'argument out of range'; |
| 27 |
} |
| 28 |
); |