Please enable JavaScript.
Coggle requires JavaScript to display documents.
TYPESCRIPT, https://www.typescript-training.com/course/intermediate-v1 -…
TYPESCRIPT
types
explicit
syntax :type
:string
:number
:any
custom types
interface keyword
for objects
type keyword
recursive types
unnknown
union types
discriminated union types
syntax |
intersection types &
works well with spread operator at return
inferred types
at initialization with a value
type guards
instanceof
typeof
nullish values
?.
!.
type parameters
generics
<T>
<T extends interface>
dictionaries
map
filter
reduce
https://www.typescript-training.com/course/fundamentals-v3/15-dict-map-filter-reduce/
type queries
keyof
typeof
conditional types
T extends "grill" ? Grill : Oven
extract
exclude
infer
type constructorArg<C> = C extends {blah blah infer}
mapped types
indexed access types
arbitrary string/numbers
<keyType, valueType>={[key in keytype]:valueType}
mapping modifiers
partial
readonly
required
template literal types
makes use of backticks
paint${colors}
key mapping
as keyword
pick<>
this
create context artificially
bind
apply
call
can be specified in a type definition
can be inferred from creating the context with methods
classes
access modifiers
public
private
protected
readonly
constructor
puram properties
defines what the constructors creates and what types does it use
super()
modules
import
export
functions
function overloads
single union with multiple types assigned in more than one variable
https://www.typescript-training.com/course/intermediate-v1