Index
Symbols
- ! (exclamation mark), nonnull assertion operator, Nonnull Assertions
- & (ampersand), for intersection types, Union and intersection types, Type Operators for Object Types
- () (parentheses), invoking functions with, call, apply, and bind
- * (asterisk), before function names, Generator Functions
- + (plus) type operator, Mapped Types
- /// (triple-slash directives), Triple-Slash Directives
- < > (angle brackets)
- ? (question mark)
- @ts-check comment, Step 2a: Enable Typechecking for JavaScript (Optional)
- @ts-ignore comment, JavaScript That Doesn’t Have Type Declarations on DefinitelyTyped
- @ts-nocheck comment, Step 2a: Enable Typechecking for JavaScript (Optional)
- [] (square brackets)
- {} (curly braces), defining object literal types with, Objects
- | (pipe symbol), for union types, Union and intersection types, Type Operators for Object Types, In the Browser: With Web Workers
- – (minus) type operator, Mapped Types
- … (ellipsis) in variadic function parameters list, Rest Parameters
A
- abstract classes, Classes and Inheritance, Classes and Inheritance
- abstract syntax tree (AST), The Compiler
- actual parameters (see arguments)
- Ahead-of-Time (AoT) compiler (Angular), Angular, Services
- aliases (type) (see type aliases)
- allowJs TSC flag, Step 1: Add TSC
- ambient module declarations, Ambient Module Declarations
- ambient type declarations, Ambient Type Declarations
- ambient variable declarations, Ambient Variable Declarations
- AMD module standard, A Brief History of JavaScript Modules
- amd-module directive, The amd-module Directive
- Angular 6/7, Angular-Services
- angularCompilerOptions, Components
- any type, any
- APIs
- apply function, call, apply, and bind
- arguments
- arity
- arrays, Arrays-Read-only arrays and tuples
- Array type, extending safely, Safely Extending the Prototype
- Array.prototype.includes (ES2016), lib
- covariance in array members, Shape and array variance
- filtering, Polymorphism
- generic functions on Array type, Where Can You Declare Generics?
- homogeneous, Arrays
- lists of function parameters passed in as, Rest Parameters
- read-only, Read-only arrays and tuples
- syntaxes for, T[] and Array<T>, Arrays
- tuples, Tuples
- as (type assertion), Type Assertions
- as const, The const type
- assertions
- assignability, Talking About Types, Assignability
- assignment, this variable, Typing this
- AST (abstract syntax tree), The Compiler
- async and await syntax, Asynchronous Programming, Concurrency, and Parallelism, async and await
- asynchronous programming, Asynchronous Programming, Concurrency, and Parallelism-Typesafe Multithreading
- asynchronously loading modules, A Brief History of JavaScript Modules
B
- Babel, running typechecked TypeScript code through, lib
- backend frameworks, Backend Frameworks
- bigint type, bigint
- binary trees, Bounded Polymorphism
- bind function, call, apply, and bind
- binding
- boolean type, All About Types, boolean
- bottom type, null, undefined, void, and never
- bounded polymorphism, Bounded Polymorphism-Using bounded polymorphism to model arity
- bounds, Talking About Types
- Browserify, A Brief History of JavaScript Modules
- browsers
- build flag (TSC), Project References
- build tools, Running TypeScript in the Browser
- builder pattern, Builder Pattern
- bytecode, The Compiler
C
- call function, call, apply, and bind
- call signatures, Call Signatures-Call Signatures
- callbacks, Working with Callbacks-Working with Callbacks
- catch clause, Regaining Sanity with Promises, async and await
- channels, emitting events on, Event Emitters
- checkJs TSC flag, Step 2a: Enable Typechecking for JavaScript (Optional)
- class keyword, Classes and Inheritance
- classes, Classes and Interfaces-Using this as a Return Type
- and inheritance, Classes and Inheritance
- binding of generics, When Are Generics Bound?
- covariance in class members, Shape and array variance
- declaring both values and types, Classes Declare Both Values and Types
- declaring, type declarations and, Type Declarations
- decorators, Decorators-Decorators
- design patterns, Design Patterns-Builder Pattern
- implementing interfaces, Implementations
- mixins, Mixins-Decorators
- polymorphism, Polymorphism
- simulating final classes, Simulating final Classes
- structural typing, Classes Are Structurally Typed
- super calls, super
- using this as return type, Using this as a Return Type
- classic mode (moduleResolution flag), Declaration Merging
- CLI (command-line interface) in Angular, Angular
- client/server communications, Typesafe APIs-Typesafe APIs
- code editors, When are types checked?
- code examples from this book, Using Code Examples
- code splitting, Dynamic Imports
- code style
- CommonJS module setting (TSC), Dialing In Your Compile Target
- CommonJS module standard, A Brief History of JavaScript Modules
- companion object pattern, Companion Object Pattern, Declaration Merging
- compile target for TypeScript projects, Dialing In Your Compile Target-lib
- compilers
- components
- composite (compiler option), Project References
- concrete types, Polymorphism
- conditional types, Conditional Types-Escape Hatches
- const
- const values, boolean
- constraints, Talking About Types
- constructor signatures, Classes Declare Both Values and Types
- constructors
- contextual typing, Contextual Typing
- contravariance, Shape and array variance
- conversions (type), Are types automatically converted?
- core-js library, lib
- covariance, Shape and array variance
- createElement DOM API, Overloaded Function Types
- CSS files, loading, Ambient Module Declarations
D
- .d.ts file extension (type declarations), Type Declarations
- databases, application interacting with, Backend Frameworks
- declaration (compiler option), Project References
- declaration maps, Artifacts
- declaration merging, Declaration Merging, Declaration Merging-Declaration Merging, Does It Merge?
- declarationMap (compiler option), Project References
- declare keyword, Type Declarations, Type Declarations
- declare module syntax, Ambient Module Declarations
- decorators, Decorators-Decorators
- defaults
- definite assignment assertions, Definite Assignment Assertions
- DefinitelyTyped
- dependency injector (Angular), Services
- design patterns, Design Patterns-Builder Pattern
- dialog, closing with nonnull assertions, Nonnull Assertions
- directives
- distributive property of conditional types following, Distributive Conditionals
- DOM (Document Object Model), Preface
- dom library for TSC, In the Browser: With Web Workers
- Don't Repeat Yourself (DRY), Type aliases
- downlevelIteration TSC flag, Iterators
- DRY (Don't Repeat Yourself), Type aliases
- duck typing, Objects
- (see also structural typing)
- dynamic imports, Dynamic Imports
E
- editors, When are types checked?
- Either type, The Option Type
- engines (JavaScript), The Compiler
- enums, Enums-Summary, Simulating Nominal Types
- assignability, Assignability
- avoiding use of, Enums
- const, Enums
- naming conventions, Enums
- preserveConstEnums TSC flag, Enums
- splitting across multiple declarations, Enums
- with explicit numeric values, example of, Enums
- with inferred numeric values, example of, Enums
- with partially inferred values, example of, Enums
- errors
- error messages in TypeScript, Introduction
- handling, Handling Errors-Exercises
- in callbacks, Working with Callbacks
- in JavaScript, Introduction
- in Promise implementation, Regaining Sanity with Promises
- monitoring in TypeScript projects, Error Monitoring
- surfacing, in JavaScript versus TypeScript, When are errors surfaced?
- TypeScript errors
- TS1332, symbol
- TS1353, bigint
- TS2300, Type aliases, Declaration Merging
- TS2304, A JSX primer, Ambient Variable Declarations
- TS2314, When Are Generics Bound?, The infer Keyword
- TS2322, boolean, bigint, string, Objects, Objects, Tuples, Generic Type Inference, Excess property checking
- TS2339, Introduction, Objects, Read-only arrays and tuples, Enums, Enums, Polymorphism, User-Defined Type Guards, Frontend Frameworks
- TS2345, Introduction, Talking About Types, Arrays, Arrays, Enums, Declaring and Invoking Functions, Classes Are Structurally Typed, Shape and array variance, Function variance, Function variance, Excess property checking, Excess property checking, The keyof operator, Nonnull Assertions, Simulating Nominal Types
- TS2362, Generic Type Inference
- TS2365, Introduction, Are types automatically converted?
- TS2366, Totality
- TS2367, symbol
- TS2393, Collisions
- TS2428, Declaration Merging
- TS2430, Interfaces
- TS2454, Definite Assignment Assertions
- TS2469, symbol
- TS2476, Enums
- TS2511, Classes and Inheritance
- TS2531, Nonnull Assertions
- TS2532, Objects
- TS2540, Objects
- TS2542, Read-only arrays and tuples
- TS2554, Declaring and Invoking Functions, Rest Parameters, Using bounded polymorphism to model arity
- TS2558, Generic Type Inference
- TS2571, unknown
- TS2684, Typing this
- TS2706, Generic Type Defaults
- TS2717, Declaration Merging
- TS2739, The Record Type
- TS2741, Objects, Objects
- TS7006, Contextual Typing
- TS7030, Totality
- ES2015, A Brief History of JavaScript Modules
- escape hatches, Escape Hatches-Definite Assignment Assertions
- esModuleInterop TSC flag, A JSX primer, Using CommonJS and AMD Code
- ESNext features, target
- esnext module mode, Dynamic Imports
- event emitters, Async Streams, Typesafe Multithreading
- event loop, JavaScript’s Event Loop-JavaScript’s Event Loop
- event queue, JavaScript’s Event Loop
- exceptions, Handling Errors
- excess property checking, Excess property checking
- executors, Regaining Sanity with Promises
- exhaustiveness checking, Totality
- experimentalDecorators TSC flag, Decorators
- exports
- extends keyword, Classes and Inheritance
- extends option (TSC), Project References
F
- factory pattern, Factory Pattern
- filesystem, module paths as filenames on, import, export
- final classes, simulating, Simulating final Classes
- finally clause, async and await
- fixed-arity functions, Rest Parameters
- flow-based type inference, Refinement
- folder structure for TypeScript projects, index.ts, Project Layout
- formal parameters (see parameters)
- frameworks, Frontend and Backend Frameworks-Summary
- fresh object literal type, Excess property checking
- fullTemplateTypeCheck TSC flag, Components
- Function type, Call Signatures
- functions, Functions-Exercises, Advanced Function Types-User-Defined Type Guards
- binding generics, When Are Generics Bound?
- declaring and invoking, Declaring and Invoking Functions-Overloaded Function Types
- call signatures, Call Signatures-Call Signatures
- contextual typing, Contextual Typing
- declaring with named function syntax, Declaring and Invoking Functions
- generator functions, Generator Functions
- invoking functions, Declaring and Invoking Functions
- invoking with call, apply, and bind, call, apply, and bind
- iterators, Iterators-Iterators
- optional and default parameters, Optional and Default Parameters
- overloaded function types, Overloaded Function Types-Overloaded Function Types
- rest parameters, Rest Parameters
- typing this variable, Typing this
- decorator, Decorators
- improving type inference for tuples, Improving Type Inference for Tuples
- null, undefined, void and never return types, null, undefined, void, and never
- overloaded ambient function declarations, Collisions
- parameter types, Talking About Types
- polymorphism, Polymorphism-Type-Driven Development
- type-driven development, Type-Driven Development
- user-defined type guards, User-Defined Type Guards
- variance, Function variance
G
- generator functions, Generator Functions
- generic type parameters, Polymorphism
- generic types, Polymorphism
- generics, Polymorphism
- binding, when it happens, When Are Generics Bound?-Where Can You Declare Generics?
- bounded polymorphism, Bounded Polymorphism-Using bounded polymorphism to model arity
- classes and interfaces support for, Polymorphism-Mixins
- declaring as part of a condition, Conditional Types, The infer Keyword
- interface declaring, Declaration Merging
- subtyping, Variance
- type aliases, Generic Type Aliases
- type defaults, Generic Type Defaults
- type inference, Generic Type Inference-Generic Type Aliases
- global namespace, Safely Extending the Prototype, Compiled Output
- global.JSX namespace, TSX = JSX + TypeScript
- globals (browser), A Brief History of JavaScript Modules, Using CommonJS and AMD Code
- gradually typed languages, How are types bound?
I
- immediately invoked function expressions (IIFEs), A Brief History of JavaScript Modules
- immutable arrays, Read-only arrays and tuples
- implements keyword, Implementations
- import function, Dynamic Imports
- import statements, Safely Extending the Prototype, Dynamic Imports
- imports
- index signatures, Objects
- index.ts, index.ts
- infer keyword, The infer Keyword
- inferring types, The Type System
- inheritance, Classes and Inheritance
- simulating multiple inheritance, Mixins
- inner nodes, Bounded Polymorphism
- instance methods, Classes and Inheritance
- instanceof operator, Classes Declare Both Values and Types
- interfaces, Interfaces-Implementing Interfaces Versus Extending Abstract Classes
- Angular lifecycle hooks, Components
- binding of generics, When Are Generics Bound?
- comparison with type aliases, Interfaces
- declaration merging, Declaration Merging
- extending objects, classes, or other interfaces, Interfaces
- implementation, Implementations
- implementing versus extending abstract classes, Implementing Interfaces Versus Extending Abstract Classes
- merging, Declaration Merging
- polymorphism, Polymorphism
- top-level, in type declaration files, Type Declarations
- internal triple-slash directives, Internal Directives
- interpreted languages, The Compiler
- intersection types, Union and intersection types, Interfaces
- intrinsic elements (TSX), TSX
- invalid actions, Introduction
- invariance, Shape and array variance
- isomorphic programs, Dialing In Your Compile Target
- iterable iterators, Iterators
- IterableIterator type, Generator Functions
- iterables, Iterators
- iterators, Iterators-Iterators
J
- JavaScript, Preface
- built-in iterators for collection types, Iterators
- compile target for TypeScript projects, Dialing In Your Compile Target-lib
- language versions and releases, target
- configuring build pipeline to compile TypeScript code to, Running TypeScript in the Browser
- engine, The Compiler
- event loop, JavaScript’s Event Loop-JavaScript’s Event Loop
- interoperating with, Interoperating with JavaScript-Summary
- latest syntax and features, Style
- modules, brief history of, A Brief History of JavaScript Modules-A Brief History of JavaScript Modules
- optimizing bundles for fast loading, Running TypeScript in the Browser
- type system, comparison to TypeScript, TypeScript Versus JavaScript-When are errors surfaced?
- TypeScript program compiled to, Artifacts
- JSDoc annotations, Step 2b: Add JSDoc Annotations (Optional)
- JSON (JavaScript Object Notation)
- JSX (JavaScript XML), A JSX primer
- jsx directive, TSX = JSX + TypeScript
L
- LABjs, loading module with, A Brief History of JavaScript Modules
- lazy and asynchronous loading modules, A Brief History of JavaScript Modules
- leading with the types, Type-Driven Development
- leaf nodes, Bounded Polymorphism
- let
- lib directive, Triple-Slash Directives
- lib setting (TSC), Ambient Variable Declarations, Dialing In Your Compile Target, lib
- lib tsconfig.json option, Frontend Frameworks
- lifecycle hooks (Angular), Components
- listeners, creating, Event Emitters
M
- mapped types, Mapped Types-Companion Object Pattern
- MatrixProtocol, Typesafe protocols
- memory safety, In the Browser: With Web Workers
- message passing (Web Workers), In the Browser: With Web Workers
- methods, Classes and Inheritance
- mixins, Mixins-Decorators
- module mode versus script mode, Module Mode Versus Script Mode
- module setting (TSC), Dialing In Your Compile Target
- module setting (tsconfig.json), Compiled Output
- module.exports, A Brief History of JavaScript Modules
- moduleResolution TSC flag, Declaration Merging
- modules, Namespaces.Modules-Module Mode Versus Script Mode
- ambient module declarations, Ambient Module Declarations
- amd-module directive, The amd-module Directive
- brief history of JavaScript modules, A Brief History of JavaScript Modules-A Brief History of JavaScript Modules
- import, export, import, export-import, export
- imported from JavaScript, type lookup for, Type Lookup for JavaScript-Using Third-Party JavaScript
- module field in tsconfig.json, Step 1: Add TSC
- picking module system to compile TypeScript to, Running TypeScript in the Browser
- preferring over namespaces, Compiled Output
- telling TypeScript about a third-party module installed with NPM, Type Declarations
- untyped, importing from third-party JavaScript, JavaScript That Doesn’t Have Type Declarations on DefinitelyTyped
- writing declaration files for third-party JavaScript modules, Recipes for Writing Declaration Files for Third-Party JavaScript Modules-Modules
- Moment.js date manipulation library, Dynamic Imports
- multithreading, Typesafe Multithreading-In NodeJS: With Child Processes
N
- named function syntax, Declaring and Invoking Functions
- namespace keyword, Namespaces
- namespaces, Namespaces-Compiled Output
- never type, null, undefined, void, and never, Distributive Conditionals
- new operator, Classes Declare Both Values and Types
- new(…any[]) syntax for extended class constructors), Decorators
- next method, Iterators
- no-invalid-this TSLint rule, Typing this
- Node API for Redis, Event Emitters
- node mode (moduleResolution flag), Declaration Merging
- NodeJS
- nodes (binary tree), Bounded Polymorphism
- noImplicitAny flag in tsconfig.json, any
- noImplicitAny flag in tsconfig.sh, Step 2a: Enable Typechecking for JavaScript (Optional)
- noImplicitReturns TSC flag, Totality
- noImplicitThis TSC option, Typing this
- nominal types, simulating, Simulating Nominal Types-Simulating Nominal Types
- nominal typing, Objects
- nonnull assertions, Nonnull Assertions
- NPM package manager, Code Editor Setup
- null type, null, undefined, void, and never
- example of usage, null, undefined, void, and never
- function returning null, Returning null
- nonnull assertions, Nonnull Assertions
- problems with in programming languages, null, undefined, void, and never
- strict null checking, null, undefined, void, and never
- summary of usage, null, undefined, void, and never
- variables initialized to, type widening, Type Widening
- number type, All About Types, number
- numbers, numeric separators in, number
O
- object literals, Objects
- object-relational mappers (ORMs), Backend Frameworks
- objects, Objects-Intermission: Type Aliases, Unions, and Intersections, Advanced Object Types-Companion Object Pattern
- companion object pattern, Companion Object Pattern
- covariant members, Shape and array variance
- declaring in TypeScript, Objects
- empty, Objects
- filtering arrays of, Polymorphism
- index signature, Objects
- invariant property types in some languages, Shape and array variance
- mapped types, Mapped Types-Companion Object Pattern
- properties of, Objects
- Record type, The Record Type
- shape of, Objects
- type operators for, Type Operators for Object Types-The keyof operator
- Observables, Async Streams
- Option type, The Option Type-The Option Type
- ORMs (object-relational mappers), Backend Frameworks
- outFile TSC flag, Running TypeScript in the Browser
- overloaded ambient function declarations, Collisions
- overloaded function types, Overloaded Function Types-Overloaded Function Types
P
- parallelism, Typesafe Multithreading
- (see also multithreading)
- parameters
- path directive, Triple-Slash Directives
- paths (module), import, export, Dynamic Imports, Declaration Merging
- polyfills, Dialing In Your Compile Target
- polymorphism, Polymorphism-Type-Driven Development
- preserveConstEnums TSC flag, Enums
- private (access modifier), Classes and Inheritance
- project references, Project References-Error Monitoring
- projects, setting up for TypeScript, index.ts
- promises, Regaining Sanity with Promises-Regaining Sanity with Promises
- properties
- protected (access modifier), Classes and Inheritance
- protocols
- prototypes, extending safely, Safely Extending the Prototype-Summary
- public (access modifier), Classes and Inheritance
R
- React, React-Using TSX with React
- reactive programming libraries, Async Streams
- readonly modifier, Objects
- ReadonlyArray type, Read-only arrays and tuples
- Record type, The Record Type
- Redis library, using, Event Emitters
- reference types, Style
- references (compiler option), Project References
- refinement (types), Refinement-Discriminated union types
- require calls, A Brief History of JavaScript Modules
- rest parameters, Rest Parameters
- return statements, totality checking, Totality
- return types
- role-oriented programming, Mixins
- runtime, The Compiler
- RxJS library, Async Streams
S
- safety flags (TSC), TSC Compiler Flags for Safety
- scoped declarations, Scoped Declarations
- script mode versus module mode, Module Mode Versus Script Mode
- self-hosting compilers, Code Editor Setup
- sequencing operations
- services (Angular), Services
- shapes
- shorthand call signatures, Overloaded Function Types
- source maps, Artifacts
- SQL calls, Backend Frameworks
- src/index.ts, index.ts
- strict flags in TSC, any, TSC Compiler Flags for Safety
- strict mode (TSC), Step 2a: Enable Typechecking for JavaScript (Optional)
- strictBindCallApply option, call, apply, and bind
- strictFunctionTypes TSC flag, Function variance
- strictNullChecks and strictPropertyInitialization TSC flags, Classes and Inheritance
- strictNullChecks option, null, undefined, void, and never
- string type, All About Types, string
- strings
- structural typing, Objects
- subtypes, Subtypes and Supertypes
- super calls, super
- supertypes, Subtypes and Supertypes
- symbol type, symbol
- example usages for unique symbol, symbol
- Symbol.iterator, Iterators
T
- tags for union types, Discriminated union types
- target setting (TSC), Dialing In Your Compile Target
- tasks, JavaScript’s Event Loop
- tests, relying on to find errors, Introduction
- then clause, Regaining Sanity with Promises
- third-party JavaScript, using, Using Third-Party JavaScript-JavaScript That Doesn’t Have Type Declarations on DefinitelyTyped
- this variable, call, apply, and bind
- totality, Totality-Totality
- traits, Mixins
- transpiling, Dialing In Your Compile Target
- triple-slash directives, Triple-Slash Directives-The amd-module Directive, Triple-Slash Directives-Deprecated Directives
- true and false values (boolean type), boolean
- Try type, The Option Type
- try/catch statements, Throwing Exceptions, Regaining Sanity with Promises
- TSC compiler, The Compiler, Code Editor Setup
- artifacts generated by, Artifacts
- checkJs flag, Step 2a: Enable Typechecking for JavaScript (Optional)
- compiling JavaScript code, Step 1: Add TSC
- configuring with tsconfig.json, tsconfig.json
- declarations flag, Type Declarations
- downlevelIteration flag, Iterators
- enabling DOM APIs, Frontend Frameworks
- enabling dom lib for, In the Browser: With Web Workers
- enabling noImplicitAny flag, Step 2a: Enable Typechecking for JavaScript (Optional)
- enabling webworker lib for, In the Browser: With Web Workers
- esModuleInterop flag, A JSX primer, Using CommonJS and AMD Code
- experimentalDecorators flag, Decorators
- fullTemplateTypeCheck flag, Components
- generating JavaScript bundles, Running TypeScript in the Browser
- installing with npm, Code Editor Setup
- jsx flag, TSX = JSX + TypeScript
- keyofStringsOnly flag, The keyof operator
- lib setting, Ambient Variable Declarations
- moduleResolution flag, Declaration Merging
- namespace output, Compiled Output
- noImplicitReturns flag, Totality
- noImplicitThis option, Typing this
- preserveConstEnums option, Enums
- project references, Project References-Error Monitoring
- safety flags, TSC Compiler Flags for Safety
- setting to dial in environments to target, Dialing In Your Compile Target
- strictBindCallApply option, call, apply, and bind
- strictFunctionTypes flag, Function variance
- strictNullChecks and strictPropertyInitialization flags, Classes and Inheritance
- strictNullChecks option, null, undefined, void, and never
- types and typeRoots settings, Type Lookup for JavaScript
- using more stringent flags on migrated JavaScript code, Step 4: Make It strict
- tsconfig.json, tsconfig.json
- TSLint
- tslint.json, tslint.json
- TSX
- tuples, Tuples
- type aliases, Type aliases
- type branding, Simulating Nominal Types
- type declarations, Type Declarations-Ambient Module Declarations, Artifacts
- ambient module declarations, Ambient Module Declarations
- ambient type declarations, Ambient Type Declarations
- ambient variable declarations, Ambient Variable Declarations
- creating for third-party JavaScript and sending to NPM, JavaScript That Doesn’t Have Type Declarations on DefinitelyTyped
- differences from regular TypeScript syntax, Type Declarations
- DOM type declarations, enabling, lib
- example with equivalent TypeScript code, Type Declarations
- in JavaScript on DefinitelyTyped, JavaScript That Has Type Declarations on DefinitelyTyped
- JavaScript code without on DefinitelyTyped, JavaScript That Doesn’t Have Type Declarations on DefinitelyTyped
- uses of type declaration files, Type Declarations
- type guards, User-Defined Type Guards
- type inference
- type literals, boolean
- type operators, Type Operators
- type refinement (see refinement)
- type safety, Introduction
- type signatures (see call signatures)
- type systems, The Type System-When are errors surfaced?
- type utilities, Type Utilities
- type widening, Type Widening-The const type
- type-driven development, Type-Driven Development
- type-level code, Call Signatures
- typechecker, The Compiler, All About Types
- typechecking, The Compiler
- typeof operator, Classes Declare Both Values and Types, User-Defined Type Guards
- using with array items, Arrays
- types
- advanced object types, Advanced Object Types-Companion Object Pattern
- binding, JavaScript versus TypeScript, How are types bound?
- classes declaring both values and types, Classes Declare Both Values and Types
- conditional, Conditional Types-Escape Hatches
- conversions, JavaScript versus Typescript, Are types automatically converted?
- declarations generating, Does It Generate a Type?
- declaring type this variable, Typing this
- defined, All About Types
- DOM type declarations, enabling, Frontend Frameworks
- escape hatches, Escape Hatches-Definite Assignment Assertions
- extending the prototype safely, Safely Extending the Prototype-Summary
- function, Advanced Function Types-User-Defined Type Guards
- merging types and values, Declaration Merging
- relationships between, Relationships Between Types-Discriminated union types
- sketching out programs in, Conclusion
- supported by TypeScript, The ABCs of Types-Summary
- any, any
- arrays, Arrays-Read-only arrays and tuples
- bigint, bigint
- boolean, boolean
- null, undefined, void, and never, null, undefined, void, and never-null, undefined, void, and never
- number, number
- objects, Objects-Intermission: Type Aliases, Unions, and Intersections
- string, string
- symbol, symbol
- tuples, Tuples
- type aliases, Type aliases
- types and their subtypes, Summary
- union and intersection types, Union and intersection types
- unknown, unknown
- terminology and vocabulary of, Talking About Types
- top-level, in type declaration files, Type Declarations
- totality, Totality-Totality
- type lookup for JavaScript, Type Lookup for JavaScript-Using Third-Party JavaScript
- types and typeRoots settings (TSC), Type Lookup for JavaScript
- types directive, The types Directive
- TypeScript
- benefits of, Introduction
- building a project, Building Your TypeScript Project-Error Monitoring
- compiler, TypeScript: A 10_000 Foot View-The Compiler
- errors, handling of, Introduction
- gradually migrating JavaScript code to, Gradually Migrating from JavaScript to TypeScript-Step 4: Make It strict
- modules, consuming and exporting, A Brief History of JavaScript Modules
- publishing code to NPM, Publishing Your TypeScript Code to NPM-Publishing Your TypeScript Code to NPM
- running in the browser, Running TypeScript in the Browser
- running on the server, Running TypeScript on the Server
- setting up code editors, Code Editor Setup-tslint.json
- setting up projects, index.ts file, index.ts
- triple-slash directives, Triple-Slash Directives-The amd-module Directive
- type system, The Type System-When are errors surfaced?
- TypeSearch, JavaScript That Has Type Declarations on DefinitelyTyped
U
- undefined type, null, undefined, void, and never
- example of usage, null, undefined, void, and never
- nonnull assertions, Nonnull Assertions
- summary of usage, null, undefined, void, and never
- variables initialized to, type widening, Type Widening
- union types, Union and intersection types
- unique symbols, symbol, Simulating Nominal Types
- unknown type, unknown
- user-defined type guards, User-Defined Type Guards
V
- value-based elements (TSX), TSX
- value-level code, Call Signatures
- value: type annotations, The Type System
- values, Style
- classes declaring both values and types, Classes Declare Both Values and Types
- declarations generating, Does It Generate a Type?
- merging values and types, Declaration Merging
- null and undefined, null, undefined, void, and never
- top-level, in type declaration files, Type Declarations
- type declarations and, Type Declarations
- var
- variables
- ambient variable declarations, Ambient Variable Declarations
- ambient versus regular declarations, Type Declarations
- declaring, then initializing with values, Objects
- immutable, no type widening, Type Widening
- mutable, type widening, Type Widening
- with explicitly annotated types, The Type System
- with implicitly inferred types, The Type System
- variadic functions, Rest Parameters
- variance, Variance-Function variance
- view layer of frontend applications (React), React
- void type, null, undefined, void, and never
- VSCode, Code Editor Setup
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.