/** * Extend the built-in class Error cause a few problems with prototype. * To solve this problem, prototype is managed inside the constructor and * all the other errors inherits from this class. */ export default class BaseError extends Error { __proto__: Error; constructor(message?: string); }