All posts by
Jarosław Glegoła

Sep 6 2021

How to turn on TypeScript strict mode in specific files

Imagine you have to migrate your JavaScript project to TypeScript. It’s fairly simple to convert one file from JS to TS, but if you want to take type checking to the next level (going for TypeScript’s strict mode) it is not that easy. The only solution you have is turning on strict mode for the whole project which may result in thousands of errors. For most projects that are not strict yet, it would take quite a bit of time and effort to fix all the strict errors at once.


Jarosław Glegoła

Front-end software person. Loves TypeScript so much that he uses it in real life.