How to type an error in try-catch block
TL;DR: TypeScript catch clause variables can now be typed as unknown for better type safety since version 4.0.Try-catch blocks are used to handle exceptions. Before TypeScript 4.0, the catch clause variable was typed as any, which meant it could be a...
decpk.hashnode.dev5 min read