Uncertainty / Uncertainty Checking is simply changing the type of types from type models. As usual, all this happens during the type-checking phase, and nothing is in the emitted JavaScript to ensure this at runtime.
In any case, you can think of the type as a domain of values. For example, a domain booleanusually represents only two values trueand false. string- an unlimited domain that contains strings of the type "hello"and "world"and any other string.
TypeScript verifies that when a value is used at some type position, that value is in a domain of that type. For example, trueit is not in the domain number, so it is unacceptable to try to use truewhere it is expected number.
TypeScript , null undefined . , boolean : true, false, undefined null. , , undefined null , true false. , substr string null undefined, .
TypeScript , null undefined . null , string, string. string | null , string null.
Build 2016, 44:30, , , , , , , .