TypeScript tutorialLesson 4Free preview
TS Simple Types
This lesson is part of TypeScript · All levels
Summary
TypeScript provides simple primitive types such as string, number, boolean, bigint, symbol, and P1. This type is declared with an annotation after the variable name so that the input value is expected. With simple type, a data type error can be known before a program is run.
Key points
- Primitive major: string, number, boolean, bigint, symbol
- Annotations are written with colon after the name
- Type checked compiler, not runtime
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.