Symbol.iterator A method that returns the default iterator for an object. Called by the semantics of the for-of statement.
Weeding out Errors Like we mentioned, it’s not unexpected to get error messages after conversion. The important thing is to actually go one
Decorator Factories If we want to customize how a decorator is applied to a declaration, we can write a decorator factory. A Decorator Factory
Reusable Types (Type Aliases) Documentation Anywhere a greeting is expected, you can provide
Symbol.hasInstance A method that determines if a constructor object recognizes an object as one of the constructor’s instances
Typing the function Let’s add types to our simple examples from earlier: function
// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~] // Project: [~THE PROJECT NAME~] // Definitions by: [~YOUR
Writing a Configuration File TypeScript uses a file called tsconfig.json for managing your project’s options, such as which files
Re-exports Often modules extend other modules, and partially expose some of their features. A re-export does not import it locally, or introduce
Default exports Each module can optionally export a default export. Default exports are marked with the keyword default;
Page 3 of 29