3 ms·
I thought the tool to automatically migrate JS to TS was tsc --init and then set the flag to include js files.
by coding123 6y ago
I thought the tool to automatically migrate JS to TS was tsc --init and then set the flag to include js files.
- seattle_spring 6y agoThis tool actually converts JS files to valid TS files with strict typing, attempting to add types to everything it can and adding placeholder types where it can't.
- asutekku 6y agoThat’s just running js files within ts files. Nothing to really do with migrating, unless you’re writing everything by hand and want everything to work while you’re at it.
- agustif 6y agoWell, actually is a good base to migratee a js codebase to ts manually, one file at a time. You can leave parts in JS while you upgrade/add new features in TS