Import a single export from a module
  • References/JavaScript/TypeScript/Modules

Import a single export from a module import { ZipCodeValidator } from "./ZipCodeValidator"; let

2025-01-10 15:47:30
The Impact of ES6 on Module Plugins
  • References/JavaScript/TypeScript/Declaration Files

The Impact of ES6 on Module Plugins Some plugins add or modify top-level exports on existing modules. While this is legal in CommonJS and other

2025-01-10 15:47:30
Indexable Types
  • References/JavaScript/TypeScript/Interfaces

Indexable Types Similarly to how we can use interfaces to describe function types, we can also describe types that we can “index into” like

2025-01-10 15:47:30
Excess Property Checks
  • References/JavaScript/TypeScript/Interfaces

Excess Property Checks In our first example using interfaces, TypeScript let us pass { size: number; label: string; } to something

2025-01-10 15:47:30
Scoping rules
  • References/JavaScript/TypeScript/Variable Declarations

Scoping rules var declarations have some odd scoping rules for those used to other languages. Take the following example:

2025-01-10 15:47:30
Optional Parameters in Callbacks
  • References/JavaScript/TypeScript/Declaration Files

Optional Parameters in Callbacks Don’t use optional parameters in callbacks unless you really mean it:

2025-01-10 15:47:30
Integrating with Build Tools
  • References/JavaScript/TypeScript/Tutorials

Integrating with Build Tools You might have some more build steps in your pipeline. Perhaps you concatenate something to each of your files

2025-01-10 15:47:30
Red flags
  • References/JavaScript/TypeScript/Declaration Files

Red flags

2025-01-10 15:47:30
Global Variables
  • References/JavaScript/TypeScript/Declaration Files

Global Variables Documentation The global variable foo contains the number

2025-01-10 15:47:30
Array
  • References/JavaScript/TypeScript/Basic Types

Array TypeScript, like JavaScript, allows you to work with arrays of values. Array types can be written in one of two ways. In the first, you

2025-01-10 15:47:30