Partial
1 | interface A { |
Required
1 | type Required<T> = { [K in keyof T]-?: T[K] }; |
Mutable
1 | type Mutable<T> = { -readonly [K in keyof T]: T[K] }; |
Readonly
1 | type Readonly<T> = { readonly [K in keyof T]: T[K] }; |
Record
1 | type Record<K extends keyof any, T> = { [U in K]: T}; |
Pick
1 | type Pick<T, K extends keyof T> = { [P in K]: T[P]} |
Exclude
1 | type Exclude<T, U> = T extends U ? never : T; |
Extract
1 | type Extract<T, U> = T extends U ? T : never; |
Omit
1 | type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; |
ReturnType
1 | type ReturnType<T> = T extends (...args: any) => infer P ? P : any; |