mogami-stream - v0.4.0
Guide
日本語
Preparing search index...
route
Function route
route
<
T
,
const
R
extends
Record
<
string
,
RoutePredicate
<
T
>
>
,
const
D
extends
string
|
undefined
=
undefined
,
>
(
source
:
Source
<
T
>
,
options
:
PredicateRouteOptions
<
T
,
R
,
D
>
,
)
:
FluentBranchGroup
<
RoutedValues
<
T
,
R
,
D
>
>
Routes each source item to at most one branch; predicates can narrow branch types.
Type Parameters
T
const
R
extends
Record
<
string
,
RoutePredicate
<
T
>
>
const
D
extends
string
|
undefined
=
undefined
Parameters
source
:
Source
<
T
>
options
:
PredicateRouteOptions
<
T
,
R
,
D
>
Returns
FluentBranchGroup
<
RoutedValues
<
T
,
R
,
D
>
>
route
<
T
,
const
K
extends
readonly
string
[]
>
(
source
:
Source
<
T
>
,
options
:
KeyedRouteOptions
<
T
,
K
[
number
]
>
&
{
branches
:
K
}
,
)
:
FluentBranchGroup
<
{
readonly
[
P
in
string
]
:
T
}
>
Routes each source item to at most one branch; predicates can narrow branch types.
Type Parameters
T
const
K
extends
readonly
string
[]
Parameters
source
:
Source
<
T
>
options
:
KeyedRouteOptions
<
T
,
K
[
number
]
>
&
{
branches
:
K
}
Returns
FluentBranchGroup
<
{
readonly
[
P
in
string
]
:
T
}
>
route
<
T
>
(
source
:
Source
<
T
>
,
options
:
RouteOptions
<
T
>
,
)
:
FluentBranchGroup
<
readonly
T
[]
>
Routes each source item to at most one branch; predicates can narrow branch types.
Type Parameters
T
Parameters
source
:
Source
<
T
>
options
:
RouteOptions
<
T
>
Returns
FluentBranchGroup
<
readonly
T
[]
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Guide
日本語
mogami-stream - v0.4.0
Loading...
Routes each source item to at most one branch; predicates can narrow branch types.