JavaScript has three very commonly used primitives: string, number, and boolean. Each has a corresponding type in TypeScript. As you might expect, these are the same names you'd see if you used the JavaScript typeof operator on a value of those types:
stringrepresents string values like"Hello, world"
numberis for numbers like42. JavaScript does not have a special runtime value for integers, so there's no equivalent tointorfloat- everything is simplynumber
booleanis for the two valuestrueandfalseThe type names
String,Number, andBoolean(starting with capital letters) are legal, but refer to some special built-in types that will very rarely appear in your code. Always usestring,number, orbooleanfor types.
— The TypeScript Handbook: Everyday Types