Snippet · Writing & changing code
Turn the types up slowly
Strict mode all at once produces 400 errors and a closed editor.
This project has types switched on loosely. I want strict, eventually. - Turn on one compiler flag at a time. Tell me the order, easiest first. - For the flag we're doing now, show me the errors it will produce and fix them in batches by kind, not file by file. - Where a real fix needs restructuring, say so and leave a marked escape hatch rather than pretending with `any`. Do not add `any` to make an error go away without telling me.
A silenced type error is worse than an untyped file: it looks checked. Flag every escape hatch so you can find them again.