November 2019
Intermediate to advanced
336 pages
11h 30m
English
|
Name [Section] |
TypeScript type |
Possible values |
|---|---|---|
| Empty type [2.1.1] | never | No possible values |
| Unit type [2.1.2] | void | One possible value |
| Sum type [3.4.2] | number | string | A value from number or a value from string |
| Tuple (product type) [3.1.1] | [number, string] | A value from number and a value from string |
| Record (product type) [3.1.2] | { a: number; b: string; } | A (named) value from number and a (named) value from string |
| Function type [5.1.2] | (value: number) => string | A function number → string |
| Top type [7.2.1] | unknown | A value of any type |
| Bottom type [7.2.2] | never | No possible values (the bottom type is the subtype of any other type) |
| Interface [8.1] | interface ILogger { /* ... */ } | Object of a ... |
Read now
Unlock full access