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 explicit any in very specific framework level code, unit tests or if you interface with an untyped framework.

The hassle really pays off later.

fusio
link
fedilink
141Y

this is terrible advise - you should be using unknown. using any 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

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 5 users / day
  • 9 users / week
  • 108 users / month
  • 558 users / 6 months
  • 1 subscriber
  • 899 Posts
  • 3.11K Comments
  • Modlog