By default, all types in TypeScript allow null:
function getId(x: Element) {
return x.id;
}
getId(null); // TypeScript does not complain, but this is a runtime error.
TypeScript 2.0 adds support for strict null checks. If you set --strictNullChecks when running tsc (or set this flag in you...