Class Decorators A Class Decorator is declared just before a class declaration. The class decorator is applied to the constructor of
Global Functions Documentation You can call the function greet with a string
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
Number As in JavaScript, all numbers in TypeScript are floating point values. These floating point numbers get the type number
Type assertions Sometimes you’ll end up in a situation where you’ll know more about a value than TypeScript does. Usually this will happen when
Multi-file namespaces Here, we’ll split our Validation namespace across many files. Even though the files are separate, they can
Ambient Namespaces The popular library D3 defines its functionality in a global object called d3. Because this library is loaded
export = and import = require() Both CommonJS and AMD generally have the concept of an exports object
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
Add TypeScript The next step is to add a folder for TypeScript.
Page 9 of 29