Index
A
- abstraction / Bringing abstraction with an abstract class
- any
- array
- destructuring / Destructuring a type and an array
B
- baseUrl / baseUrl and paths
- boolean type / Boolean
C
- cast
- versus explicit type / The differences between an explicit type and a cast
- casting / The reason to cast a type
- class
- about / What is a class and how do we define one?
- instantiation / How type comes into play with a class's constructor
- public, using for encapsulation / What is encapsulation using public, private, and protected
- private, using for encapsulation / What is encapsulation using public, private, and protected
- protected, using for encapsulation / What is encapsulation using public, private, and protected
- field definition, reducing with value set at construction time / Reducing the definition of a field with a value set at construction time
- comparing / Comparing classes
- configuration file / Configuration file
- const
- about / The difference between var, let, and const
- declaring / const
- constructed object
- creating / How to create a constructed object
- constructor
- enforcing, from interface / Enforcing a specific constructor from an interface
D
- declaration / Declaration and declarationdir
- declare
- versus let / The differences between declare and let/const/var
- versus const / The differences between declare and let/const/var
- versus var / The differences between declare and let/const/var
- default generic / Default generic
- definition file
- generating, with typescript / How typescript can generate a definition file
- manually adding, for JavaScript project / How to manually add a definition file for a JavaScript project
- types, merging / How to merge types into an existing definition file
- creating, for JavaScript project / Creating a definition file for a JavaScript project
- using, for global structure library / Definition file for global structure library
- using, for module library / Definition file for module library
- avoiding, for JavaScript library / JavaScript library without a definition file
- module, using / Using another module from a definition file
- adding, to existing module / Adding a definition file to an extension of an existing module
- discriminator
- using, for type identification / Using of a discriminator for type identification
- about / Using of a discriminator for type identification
E
- ECMAScript
- about / ECMAScript
- target / Target
- lib / Lib
- explicit type
- versus cast / The differences between an explicit type and a cast
F
- function expression / Crafting a typed function
- functions / Crafting a typed function
- function statement / Crafting a typed function
G
- generic code
- reusability / Generic code to increase reusability
- generic optional type / Generic optional type
- generic type
- data structure / Accepted kinds of data structure for generic type
- constaining / Constaining a generic type
- working, with intersection / Generic and intersection
- member access, limiting / Limiting the access to members of a generic type
- in TSX File / Generic type in TSX File
- Grunt / Grunt
- Gulp / Gulp
I
- implicit type / How to be strongly typed without specifying the type
- index signature
- set type, setting / How to strongly type a set/dictionary with an index signature
- dictionary type, setting / How to strongly type a set/dictionary with an index signature
- versus map / The differences between index signature and a map
- inheritance
- type, merging / Merge type with inheritance
- instanceof
- limitations / The limitations of instanceof
- interface
- intersecting / Intersecting with something other than a type
- versus type / The differences between type and interface
- using, in object-oriented / How an interface can be useful in object-oriented
- constructor, enforcing / Enforcing a specific constructor from an interface
- intersect
- type, combining / Combining type with intersect
- intersection
- working, with generic / Generic and intersection
K
- keyof
- string choices, restricting / Restricting string choices with keyof
L
- let
- about / The difference between var, let, and const
- declaring / Declaring with let
- literal type guard / Using of a discriminator for type identification
M
- map
- about / TypeScript and map
- versus index signature / The differences between index signature and a map
- mapped type
- type creation, reducing / Reducing your type creation with mapped type
- mapRoot / sourceRoot and sourceMap and mapRoot
- module / Module and ModuleResolution
- moduleResolution / Module and ModuleResolution
N
- non-primitive group
- about / Non-primitive
- void / What is void?
- any type, avoiding / The reasons to avoid using any type
- never type, using / Usage of the never type
- unknown type / Unknown type to have a stricter any type
- type, enforcing in list / Enforcing a type in a list
- conscribed set, defining of constants with enum / Defining a conscribed set of constants with enum
- string literals, versus string / String literal and its difference compared to a string
- non-public constructor
- use cases / Use cases for a non-public constructor
- NPM/CLI / NPM/CLI
- null type
- about / Null
- versus undefined type / Differentiating undefined from null
- numeric separators / Number
O
- object
- versus Object / The differences between object and Object
- using / When to use object, Object, or any
- Object
- object literal
- about / What is an object literal?
- versus, object using from class / Using an object from a class versus an object literal
- open-ended / The differences between type and interface
- optional type
- intersecting / Intersecting with an optional type
R
- readonly keyword
S
- sourceMap / sourceRoot and sourceMap and mapRoot
- sourceRoot / sourceRoot and sourceMap and mapRoot
- static member / What is static?
- string / String
- string interpolation / String
- Symbol / Symbol
T
- tagged union / Using of a discriminator for type identification
- third-party library definition file
- tuple / Tuple
- type
- combining, with intersect / Combining type with intersect
- merging, with inheritance / Merge type with inheritance
- destructuring / Destructuring a type and an array
- type assertion / What is a type assertion?
- type casting
- benefits / The reason to cast a type
- typed function
- crafting / Crafting a typed function
- typeof
- used, for comparing at runtime / Comparing at runtime and design time with typeof
- used, for comparing with design time / Comparing at runtime and design time with typeof
- TypeScript
- primitives, enhancing / Enhancing primitives with TypeScript
- number / Number
- TypeScript compiler (tsc)
- about / NPM/CLI, TypeScript compiler
- files location / Files location
- rootDir / rootDir and outDir
- outDir / rootDir and outDir
- baseUrl / baseUrl and paths
- paths / baseUrl and paths
- sourceRoot / sourceRoot and sourceMap and mapRoot
- sourceMap / sourceRoot and sourceMap and mapRoot
- mapRoot / sourceRoot and sourceMap and mapRoot
- files / Files and include and exclude
- include / Files and include and exclude
- exclude / Files and include and exclude
- outfile / Outfile
- type / Type
- typeRoots / typeRoots and types
- types / typeRoots and types
- declaration / Declaration and declarationdir
- configuration file / Configuration file
- module / Module and ModuleResolution
- ModuleResolution / Module and ModuleResolution
- ECMAScript / ECMAScript
- restrictions / Compiler strictness
- strict / Strict
- StrictFunctionTypes / StrictFunctionTypes
- StricNullChecks / StrictPropertyInitialization and StricNullChecks
- StrictPropertyInitialization / StrictPropertyInitialization and StricNullChecks
U
- undefined type
- about / Undefined
- versus null type / Differentiating undefined from null
- union
- element type, obtaining / Getting the type of element in a union
- generic constraints / Generic constraints with a union type
- user-defined guard pattern / The user-defined guard pattern
V
- var
- about / The difference between var, let, and const
- declaring / Declaring with var
- variables
- with many types / Variable with many types
W
- Webpack / Webpack