Please enable JavaScript.
Coggle requires JavaScript to display documents.
Typescript - Coggle Diagram
Typescript
Types
Bottom Types
Never
Top Types
Any
Unknown
Type Alliases & Interfaces
Type Aliases
Inheritance
Extends
implements
Recursion
Type Guards
special check
helps you narrow down a type
Type Narrowing
process of
turning less precise type
in more precise type
Nullish Values
null
undefined
void
non-null assertion op
Type annotations
Custom types
Enum
Functions
type expressions
(a: string) => void
call signatures
generic functions
describe
correspondence between 2 values
func<Type>(arr: Type[]): Type | undefined
Construct Signatures
invoked with the new op
optional parameters
function overlords
Type systems
Nominal
Structural
relating types based
on their members
Generics
<>
reduce
map
filter
Collections
Tuples
type StringNumber = [string, number];
fixed length
order is important
Arrays
let arr: Array<T>
let arr: string[]
multidimenstional
let arr: string[][] = [['a'], ['b']]
string[][] / (string[])[]
Static Type System
Dynamic Type System
type-checking is performed
compile time
run time