That's like saying the following is incorrect
let foo: number;
because at runtime you can assign a string to foo.Typescript's type system is for compile-time checking, not runtime checking. The above definition is correct if at compile-time you want to check that all assignments to foo are of type number.