Type Annotations in TypeScript
Typescript uses type annotation to specify the data type of the variable, function or function return value. It uses the syntax :[type], where type is the Typescript type. Once you have annotated an identifier to be of a certain type, you can only use it as that Type. The Typescript compiler throws an error if you use the identifier as a different type.