Import a single export from a module import { ZipCodeValidator } from "./ZipCodeValidator"; let
Use Union Types Don’t write overloads that differ by type in only one argument position:
Details The "compilerOptions" property can be omitted, in which case the compiler’s defaults are used. See our full list of supported
Optional Parameters in Callbacks Don’t use optional parameters in callbacks unless you really mean it:
Classes Documentation You can create a greeter by instantiating the Greeter
Return Types of Callbacks Don’t use the return type any for callbacks whose value will be ignored:
Objects with Properties Documentation The global variable myLib has a function
Destructuring Another ECMAScript 2015 feature that TypeScript has is destructuring. For a complete reference, see
Union types Overview Union types are a powerful way to express a value that can be one of several types
Never The never type represents the type of values that never occur. For instance, never is the return type for a
Page 10 of 29