2 ms·
A value of type "any" is assignable to anything, a value of type "unknown" is assignable to nothing. unknown forces a type cast.
by bradstewart 6y ago
A value of type "any" is assignable to anything, a value of type "unknown" is assignable to nothing. unknown forces a type cast.
- Normal_gaussian 6y agounknown forces type checking, not casting. It is essentially a union of all possible types that you have to refine down.