To augment Ryan’s answer with guidance from the TypeScript Do’s and Don’ts:
Don’t ever use the types
Number
,String
,Boolean
,Symbol
, orObject
These types refer to non-primitive boxed objects that are
almost never used appropriately in JavaScript code./* WRONG */ function reverse(s: String): String;
Do use the types
number
,string
,boolean
, andsymbol
./* OK */ function reverse(s: string): string;