|
|
|
|
|
by bazza451
2842 days ago
|
|
Real big fan of TS, like anything though you just have to be disciplined when using it. Type absolutely everything and set the transpiler to the most aggressive checks possible... If you’re being lazy and putting : any everywhere and then complaining about how good it is...you’re doing it wrong In our project I’ve found we make a lot less mistakes than with pure JS and there’s a lot less pointless type check unit tests due to the guarantee’s it gives us. io-ts (https://github.com/gcanti/io-ts) around rest endpoints checking json input as well has been a godsend. |
|
> "compilerOptions": { "strict": true }
But given the huge number of other options I worry that like GCC's '-Wall', that doesn't actually give you the strongest possible type checking. Anyone know about that? My aim with Typescript is to turn JS into OCaml.