329
Me, migrating my code from JavaScript to TypeScript:
(lemmy.world)
Post funny things about programming here! (Or just rant about your favourite programming language.)
It's a good way to get started, and then incrementally type as much as you can, preferably everything.
Later on, or if you start a new project with TypeScript, it's a good idea to turn on
noImplicitAny
and only allow explicitany
in very specific framework level code, unit tests or if you interface with an untyped framework.The hassle really pays off later.
this is terrible advise - you should be using
unknown
. usingany
you're basically disabling TS and will be under the false assumption that your code is ok while it's most likely missing a lot of runtime checks