Public by default In our examples, we’ve been able to freely access the members that we declared throughout our programs. If you’re familiar
Reusable Types (Type Aliases) Documentation Anywhere a greeting is expected, you can provide
Ordering Don’t put more general overloads before more specific overloads:
Object destructuring You can also destructure objects: let o = {
Browserify Now let’s move this project from Node to the browser. To do this, we’d like to bundle all our modules into one JavaScript file. Fortunately
Generics Because TypeScript is a structural type system, type parameters only affect the resulting type when consumed as part of the type of
// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~] // Project: [~THE PROJECT NAME~] // Definitions by: [~YOUR
Symbol.iterator A method that returns the default iterator for an object. Called by the semantics of the for-of statement.
Default exports Each module can optionally export a default export. Default exports are marked with the keyword default;
Using Namespaces Namespaces are simply named JavaScript objects in the global namespace. This makes namespaces a very simple construct to use
Page 5 of 29