Stop catching errors in TypeScript; Use the Either type to make your code predictable In some languages such as Java, methods or functions can provide type information about the Exceptions or Errors they may throw. However in TypeScript, it is not possible to know what Errors a function may throw. In fact, a function could throw any value, even a string, number, object, etc. This is why TypeScript
{{#tags}}- {{label}}
{{/tags}}