Add Angular to the gulp build
  • References/JavaScript/TypeScript/Tutorials

Add Angular to the gulp build Finally, we need to make sure that the Angular files are copied as part of the build. We need to add:

2025-01-10 15:47:30
Typing the function
  • References/JavaScript/TypeScript/Functions

Typing the function Let’s add types to our simple examples from earlier: function

2025-01-10 15:47:30
Needless Namespacing
  • References/JavaScript/TypeScript/Namespaces & Modules

Needless Namespacing If you’re converting a program from namespaces to modules, it can be easy to end up with a file that looks like this:

2025-01-10 15:47:30
Attribute type checking
  • References/JavaScript/TypeScript/JSX

Attribute type checking The first step to type checking attributes is to determine the element attributes type. This is slightly different

2025-01-10 15:47:30
Update tsconfig.json
  • References/JavaScript/TypeScript/Tutorials

Update tsconfig.json Now that Angular 2 and its dependencies are installed, we need to enable TypeScript’s experimental support for decorators

2025-01-10 15:47:30
iterator
  • References/JavaScript/TypeScript/Symbols

Symbol.iterator A method that returns the default iterator for an object. Called by the semantics of the for-of statement.

2025-01-10 15:47:30
Default exports
  • References/JavaScript/TypeScript/Modules

Default exports Each module can optionally export a default export. Default exports are marked with the keyword default;

2025-01-10 15:47:30
Add TypeScript code
  • References/JavaScript/TypeScript/Tutorials

Add TypeScript code Right click on src and click New Item. Then choose TypeScript File and name

2025-01-10 15:47:30
Variable capturing quirks
  • References/JavaScript/TypeScript/Variable Declarations

Variable capturing quirks Take a quick second to guess what the output of the following snippet is:

2025-01-10 15:47:30
Setting up your Directories
  • References/JavaScript/TypeScript/Tutorials

Setting up your Directories If you’re writing in plain JavaScript, it’s likely that you’re running your JavaScript directly, where your

2025-01-10 15:47:30