Skip to content

EasyConceptTypeScript

What is the difference between any, unknown and never?

What a good answer covers

any disables checking. unknown is the type-safe top type: you must narrow it before use. never represents values that cannot occur, such as a function that always throws or an exhaustive switch remainder.

More on TypeScript

Flashcards for this topic