onrails
GitHub
npm
Preparing search index...
@onrails/result
fluent
FluentResultAsync
Type Alias FluentResultAsync<T, E>
Opt-in dot chaining over
ResultAsync
type
FluentResultAsync
<
T
,
E
>
=
{
andThen
:
<
U
>
(
fn
:
(
value
:
T
)
=>
ResultAsync
<
U
,
E
>
,
)
=>
FluentResultAsync
<
U
,
E
>
;
chain
:
<
U
>
(
fn
:
(
value
:
T
)
=>
ResultAsync
<
U
,
E
>
)
=>
FluentResultAsync
<
U
,
E
>
;
flatMap
:
<
U
>
(
fn
:
(
value
:
T
)
=>
ResultAsync
<
U
,
E
>
,
)
=>
FluentResultAsync
<
U
,
E
>
;
map
:
<
U
>
(
fn
:
(
value
:
T
)
=>
U
)
=>
FluentResultAsync
<
U
,
E
>
;
mapErr
:
<
F
>
(
fn
:
(
error
:
E
)
=>
F
)
=>
FluentResultAsync
<
T
,
F
>
;
match
:
<
U
>
(
onOk
:
(
value
:
T
)
=>
U
,
onErr
:
(
error
:
E
)
=>
U
)
=>
Promise
<
U
>
;
resultAsync
:
ResultAsync
<
T
,
E
>
;
}
Type Parameters
T
E
Index
Properties
and
Then
chain
flat
Map
map
map
Err
match
result
Async
Properties
and
Then
andThen
:
<
U
>
(
fn
:
(
value
:
T
)
=>
ResultAsync
<
U
,
E
>
)
=>
FluentResultAsync
<
U
,
E
>
chain
chain
:
<
U
>
(
fn
:
(
value
:
T
)
=>
ResultAsync
<
U
,
E
>
)
=>
FluentResultAsync
<
U
,
E
>
flat
Map
flatMap
:
<
U
>
(
fn
:
(
value
:
T
)
=>
ResultAsync
<
U
,
E
>
)
=>
FluentResultAsync
<
U
,
E
>
map
map
:
<
U
>
(
fn
:
(
value
:
T
)
=>
U
)
=>
FluentResultAsync
<
U
,
E
>
map
Err
mapErr
:
<
F
>
(
fn
:
(
error
:
E
)
=>
F
)
=>
FluentResultAsync
<
T
,
F
>
match
match
:
<
U
>
(
onOk
:
(
value
:
T
)
=>
U
,
onErr
:
(
error
:
E
)
=>
U
)
=>
Promise
<
U
>
Readonly
result
Async
resultAsync
:
ResultAsync
<
T
,
E
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
and
Then
chain
flat
Map
map
map
Err
match
result
Async
GitHub
npm
onrails
Loading...
Opt-in dot chaining over ResultAsync