onrails
GitHub
npm
Preparing search index...
@onrails/result
extra
mapErrKind
Function mapErrKind
mapErrKind
<
E
extends
{
kind
:
string
}
,
K
extends
string
,
F
>
(
kind
:
K
,
fn
:
(
error
:
Extract
<
E
,
{
kind
:
K
}
>
)
=>
F
,
)
:
<
T
>
(
result
:
Result
<
T
,
E
>
)
=>
Result
<
T
,
E
|
F
>
Map only errors matching
kind
, leave others unchanged
Type Parameters
E
extends
{
kind
:
string
}
K
extends
string
F
Parameters
kind
:
K
fn
:
(
error
:
Extract
<
E
,
{
kind
:
K
}
>
)
=>
F
Returns
<
T
>
(
result
:
Result
<
T
,
E
>
)
=>
Result
<
T
,
E
|
F
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
GitHub
npm
onrails
Loading...
Map only errors matching
kind, leave others unchanged