ArgumentOutOfRangeError.ts 857 B

12345678910111213141516171819202122232425262728293031
  1. export interface ArgumentOutOfRangeError extends Error {
  2. }
  3. export interface ArgumentOutOfRangeErrorCtor {
  4. new(): ArgumentOutOfRangeError;
  5. }
  6. const ArgumentOutOfRangeErrorImpl = (() => {
  7. function ArgumentOutOfRangeErrorImpl(this: any) {
  8. Error.call(this);
  9. this.message = 'argument out of range';
  10. this.name = 'ArgumentOutOfRangeError';
  11. return this;
  12. }
  13. ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);
  14. return ArgumentOutOfRangeErrorImpl;
  15. })();
  16. /**
  17. * An error thrown when an element was queried at a certain index of an
  18. * Observable, but no such index or position exists in that sequence.
  19. *
  20. * @see {@link elementAt}
  21. * @see {@link take}
  22. * @see {@link takeLast}
  23. *
  24. * @class ArgumentOutOfRangeError
  25. */
  26. export const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor = ArgumentOutOfRangeErrorImpl as any;