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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 hadany
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.