By default, TypeScript’s compiler doesn’t allow you to add a custom type annotation to an error in a try-catch statement (TS1196). That’s because the underlying code can throw any type of error, even system generated exceptions, which makes it impossible for TypeScript to know the error type from the start. Luckily, there is the concept called “type guards“ which can help the TypeScript compiler to infer a specific type.Continue reading →React
It’s 2021 and TypeScript’s support for React apps improved by a lot. If you are new to TypeScript and React, you can learn from Amir Ghezelbash how to develop your first React app. In his tutorials, Amir starts from scratch and shows you on a weekly basis how to improve your React and TypeScript skills.Continue reading →Best Practices
When developing class functions that don’t rely on an internal state, it’s a good idea to turn them into static methods. This can be easily done by adding the keyword Continue reading →Hands-On
static to your function’s declaration.
Setting up a TypeScript project with Node.js takes only a few minutes. Here is how to do it the fastest way by just using Continue reading →Testing
Configuring code coverage with TypeScript and Karma to get coverage reports for code running in web browsers.Continue reading →Hands-On
The best way to get started on the Heroku polyglot platform is to follow their fantastic introduction. It’s also worth reading about their supported environments, deployment tasks and European deployment region. The second best advice is to follow our quick setup guide.Continue reading →