Skip to content

Glossary: TypeScript Basics

type annotation

Also written: annotation, annotations

A colon and a type after a name, such as `const bagsSold: number = 42`, saying what the value must hold.

Where the book teaches it

Related terms

type inference