-
Notifications
You must be signed in to change notification settings - Fork 10
Object
hkt-toolbelt / Object
Ƭ _$at<K
, T
>: T
[K
]
Name | Type |
---|---|
K |
extends keyof T
|
T |
extends Record <string , unknown > |
Ƭ _$atPath<Path
, T
>: Path
extends [infer Head, ...(infer Tail)] ? Tail
extends [] ? Head
extends keyof T
? T
[Head
] : never
: _$atPath
<_$cast
<Tail
, (string
| symbol
)[]>, T
[_$cast
<Head
, keyof T
>]> : never
Name | Type |
---|---|
Path |
extends (string | symbol )[] |
T |
T |
Ƭ _$deepInputOf<F
>: _$inputOf
<F
> | { [key: string]
: _$deepInputOf
<F
>; }
Name | Type |
---|---|
F |
extends Kind
|
Ƭ _$deepMapValues<F
, O
>: { [key in keyof O]: _$display<O[key] extends Record<string, unknown> ? _$deepMapValues<F, O[key]> : $<F, _$cast<O[key], _$inputOf<F>>>> }
Name | Type |
---|---|
F |
extends Kind
|
O |
O |
Ƭ _$emplace<K
, V
>: { [k in K]: V }
Name | Type |
---|---|
K |
extends string | number | symbol
|
V |
V |
Ƭ _$keys<T
>: _$toList
<keyof T
>
Name | Type |
---|---|
T |
extends Record <string , unknown > |
Ƭ _$mapKeys<T
, F
>: { [key in keyof T as $<F, _$cast<key, _$inputOf<F>>>]: T[key] }
Name | Type |
---|---|
T |
extends Record <string , unknown > |
F |
extends Kind <(x : string ) => string | number | symbol > |
Ƭ _$mapValues<T
, F
>: { [key in keyof T]: $<F, _$cast<T[key], _$inputOf<F>>> }
Name | Type |
---|---|
T |
extends Record <string , unknown > |
F |
extends Kind
|
Ƭ _$merge<A
, B
>: _$display
<{ [K in keyof A | keyof B]: K extends keyof B ? B[K] : K extends keyof A ? A[K] : never }>
Name | Type |
---|---|
A |
extends Record <string , unknown > |
B |
extends Record <string , unknown > |
Ƭ _$paths<T
, U
>: _$toList
<U
extends [] ? never
: U
>
Name | Type |
---|---|
T |
T |
U |
_$paths2 <T > |
Ƭ _$values<T
, Keys
>: { [key in keyof Keys]: T[_$cast<Keys[key], keyof T>] }
Name | Type |
---|---|
T |
extends Record <string , unknown > |
Keys |
_$keys <T > |