Exception.d.ts 463 B

123456789101112131415161718
  1. import { CustomError } from 'ts-custom-error';
  2. /**
  3. * Custom Error class of type Exception.
  4. */
  5. export default class Exception extends CustomError {
  6. message: string;
  7. /**
  8. * It's typed as string so it can be extended and overriden.
  9. */
  10. static readonly kind: string;
  11. /**
  12. * Allows Exception to be constructed directly
  13. * with some message and prototype definition.
  14. */
  15. constructor(message?: string);
  16. getKind(): string;
  17. }