3 ms·
`any` should really be called `every` to match the semantics, it says "this value is an instance of every type, and therefore you can do anything with it". And
by joshfee 4y ago
`any` should really be called `every` to match the semantics, it says "this value is an instance of every type, and therefore you can do anything with it".
And you might read that and thing "but that's crazy, its not possible for a value to be an instance of everything!" and you'd be right - the `any` type in TS is in fact crazy and you should not use it.
- consilient 4y agoThe intersection of all typescript types is `never`. `any` is approximately equivalent to `unknown` in contravariant positions and `never` in covariant ones.