Open dpriskorn opened 2 years ago
Yeah, this would be nice but I guess a lot of work. Is there some automated tool that would help with at least the first 90%?
Something like this maybe.
It should in principle be possible to just rename .js to .ts and set typescript to very lax checking. After that you could slowly ratchet up the checks. TS is supposed to be a strict superset of JS -- any valid JS is by stipulation valid TS.
Switching to typescript has been a huge boon for my plugins. The typechecking has saved my bacon many a time, and you get ESNext features to boot.
You might not need TypeScript... (syntax) - you can have type safety without typescript syntax
Work in progress here. Just ironing out a lot of small compiler errors mostly
I prefer strong typing to have better IDE experience and can lead to fewer errors in production because they are caught by the type system and validator.