Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

TimeoutError.ts 586B

12345678910111213141516171819202122232425262728
  1. export interface TimeoutError extends Error {
  2. }
  3. export interface TimeoutErrorCtor {
  4. new(): TimeoutError;
  5. }
  6. const TimeoutErrorImpl = (() => {
  7. function TimeoutErrorImpl(this: any) {
  8. Error.call(this);
  9. this.message = 'Timeout has occurred';
  10. this.name = 'TimeoutError';
  11. return this;
  12. }
  13. TimeoutErrorImpl.prototype = Object.create(Error.prototype);
  14. return TimeoutErrorImpl;
  15. })();
  16. /**
  17. * An error thrown when duetime elapses.
  18. *
  19. * @see {@link operators/timeout}
  20. *
  21. * @class TimeoutError
  22. */
  23. export const TimeoutError: TimeoutErrorCtor = TimeoutErrorImpl as any;