3 ms·
number is a type but also a valid identifier, so you can do things like: const number = 5; function fn(number: number): number That means that we can
by runarberg 4y ago
number is a type but also a valid identifier, so you can do things like:
const number = 5;
function fn(number: number): number
That means that we can’t always know whether we mean the type or the constant when we type:
a<number>(b)