-
Notifications
You must be signed in to change notification settings - Fork 10
Kind
Michael Poteat edited this page Feb 27, 2023
·
3 revisions
hkt-toolbelt / Kind
Ƭ _: typeof _
Ƭ _$composable<FX
>: _$every
<ComposablePair
, _$pair
<FX
>>
Name | Type |
---|---|
FX |
extends Kind [] |
Ƭ _$compose<FX
, X
>: FX
extends [...(infer Init), infer Last] ? _$compose
<_$cast
<Init
, Kind
[]>, $
<_$cast
<Last
, Kind
>, _$cast
<X
, _$inputOf
<_$cast
<Last
, Kind
>>>>> : X
Name | Type |
---|---|
FX |
extends Kind [] |
X |
X |
Ƭ _$inputOf<F
>: F
extends { f
: (x
: infer X) => unknown
} ? X
: unknown
Name | Type |
---|---|
F |
extends Kind
|
Ƭ _$outputOf<F
>: F
extends { f
: (x
: never
) => infer X } ? X
: unknown
Name | Type |
---|---|
F |
extends Kind
|
Ƭ _$pipe<FX
, X
>: _$compose
<_$reverse
<FX
>, X
>
Name | Type |
---|---|
FX |
extends Kind [] |
X |
X |
Ƭ _$reify<K
>: K
& <X>(x
: _$infer
<X
, _$cast
<X
, _$inferred
>> | _$infer
<X
, [..._$cast<X, _$inferredTuple>[]]>) => _$returnType
<K
& { [_]
: X
}["f"
]> extends Kind
<Function
> ? _$reify
<_$returnType<(K & { readonly [Kind._]: X; })["f"]>
> : _$returnType
<K
& { [_]
: X
}["f"
]>
Name | Type |
---|---|
K |
extends Kind
|
• Const
_: unique symbol