DEV Community

Discussion on: The "any" type in Typescript - simple and short explanation

Collapse
 
juliang profile image
Julian Garamendy

Exactly. I think almost anything is better than any.

In the example above we could go from number[] to (number | string)[], instead of resorting to any[]. Or generics, depending on the case.