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

ObjectUnsubscribedError.ts 787B

123456789101112131415161718192021222324252627282930
  1. export interface ObjectUnsubscribedError extends Error {
  2. }
  3. export interface ObjectUnsubscribedErrorCtor {
  4. new(): ObjectUnsubscribedError;
  5. }
  6. const ObjectUnsubscribedErrorImpl = (() => {
  7. function ObjectUnsubscribedErrorImpl(this: any) {
  8. Error.call(this);
  9. this.message = 'object unsubscribed';
  10. this.name = 'ObjectUnsubscribedError';
  11. return this;
  12. }
  13. ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);
  14. return ObjectUnsubscribedErrorImpl;
  15. })();
  16. /**
  17. * An error thrown when an action is invalid because the object has been
  18. * unsubscribed.
  19. *
  20. * @see {@link Subject}
  21. * @see {@link BehaviorSubject}
  22. *
  23. * @class ObjectUnsubscribedError
  24. */
  25. export const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = ObjectUnsubscribedErrorImpl as any;