Skip to main content

Everyday Types for TypeScripts

Everyday types are the basic building blocks of TypeScript's type system. They include primitives such as string, number and boolean, arrays and tuples, object types with optional and readonly properties, and function parameter and return annotations. Type inference lets the compiler work out many types for you, so annotations are needed mainly at boundaries.

Stage: Type Basics · Part of the TypeScript roadmap · Last reviewed 19 November 2026

What to learn in Everyday Types

Everyday Types interview questions

What is the difference between interface and type in TypeScript?

Both can describe object shapes. Interfaces can be extended and merged by redeclaring, which suits public object contracts, while type aliases can also name unions, tuples and mapped types. For plain objects they are mostly interchangeable, so teams pick one convention.

What is the difference between any and unknown?

any switches off type checking for a value, so you can do anything with it and errors slip through. unknown also accepts any value, but you must narrow it, for example with typeof, before using it. Prefer unknown for values of uncertain type.

Where Everyday Types fits in the TypeScript roadmap

Everyday Types belongs to the Type Basics stage (beginner level), which takes about 17 hours. Describe your data.

Back to the full TypeScript roadmap