3 ms·
Ah, yes, that's what I'm doing most of the time. But like you said it's no better than using JS directly, haha.
by k__ 10y ago
Ah, yes, that's what I'm doing most of the time. But like you said it's no better than using JS directly, haha.
- swax 10y agoJust changing the file extension from js to ts will often bring out bugs in your code. The type inference will often catch things. Functions that are declared multiple types or that have duplicate parameters, and a lot of other stuff will be caught.
- solomatov 10y agoActually, it's better. If the core of your application has non trivial business logic, it's a good idea to write it in typed way and write ui and other support stuff with partially typed code.
- k__ 10y agoFair enough and I think with strict null type checking, where null/undefined isn't part of any anymore things would still get much better than with plain JS.