DEV Community

Discussion on: Static Typing or Typescript

Collapse
 
bias profile image
Tobias Nickel

i recently worked on a backend, there was a function that executes some sql query and groupBy the result. the function was used from 3 other places and we knew there was something odd. It was not wrong every time, just in certain situations.

The project is mostly in typescript, (at least all code in .ts files) but that function had any as return type.

after spcifying the type, typescript directly pointed to the actual bug we had.

So, while the typeScript typesystem is not perfect (still need validation libraries for real typechecking at runtime), I believe it is valuable to use it in projects.