How to Fix instanceof Not Working For Custom Errors in TypeScript
In JavaScript, you can create custom errors by extending the built-in Error object (ever since ES 2015).
class DatabaseError extends Error {}
You can do the same thing in TypeScript, but there is an important caveat if your tsconfig.json has a compi...
dguo.hashnode.dev2 min read