Create a page Create a file in src named index.html:
Iterables An object is deemed iterable if it has an implementation for the
Multi-file namespaces Here, we’ll split our Validation namespace across many files. Even though the files are separate, they can
Use Optional Parameters Don’t write several overloads that differ only in trailing parameters:
Ambient Namespaces The popular library D3 defines its functionality in a global object called d3. Because this library is loaded
Aliases Another way that you can simplify working with of namespaces is to use import q = x.y.z to create shorter names for commonly-used
Optional and Default Parameters In TypeScript, every parameter is assumed to be required by the function. This doesn’t mean that it can’t be
The JSX result type By default the result of a JSX expression is typed as any. You can customize the type by specifying the JSX
“Do”s and “Don’t”s Many common mistakes in declaration files can be easily avoided. The
export = and import = require() Both CommonJS and AMD generally have the concept of an exports object
Page 10 of 29