Optional Properties Not all properties of an interface may be required. Some exist under certain conditions or may not be there at all. These
Sections The guide is broken down into the following sections.
Using npm npm install -g typescript@next
typeof type guards Let’s go back and write the code for the version of padLeft that uses union types. We could write
Decorator Composition Multiple decorators can be applied to a declaration, as in the following examples:
Duo
Namespacing As we add more validators, we’re going to want to have some kind of organization scheme so that we can keep track of our types and
compileOnSave Setting a top-level property compileOnSave signals to the IDE to generate all files for a given tsconfig
Using with export = or import An important rule is that export and import declarations
Function Parameter Bivariance When comparing the types of function parameters, assignment succeeds if either the source parameter is assignable
Page 12 of 29