Documentation
Github
Preparing search index...
iso-ucan
client
<internal>
RouterClient
Type Alias RouterClient<Router>
Client type that provides type-safe request methods based on router inference
type
RouterClient
<
Router
extends
InferProtocol
<
Record
<
string
,
RouteOutput
<
Capability
<
StandardSchemaV1
>
,
unknown
>
>
,
>
,
>
=
{
request
<
Cmd
extends
string
>
(
cmd
:
Cmd
,
args
:
Extract
<
Router
,
{
cmd
:
Cmd
}
>
[
"in"
]
,
)
:
Promise
<
Extract
<
Router
,
{
cmd
:
Cmd
}
>
[
"out"
]
>
;
}
Type Parameters
Router
extends
InferProtocol
<
Record
<
string
,
RouteOutput
<
Capability
<
StandardSchemaV1
>
,
unknown
>
>
,
>
Index
Methods
request
Methods
request
request
<
Cmd
extends
string
>
(
cmd
:
Cmd
,
args
:
Extract
<
Router
,
{
cmd
:
Cmd
}
>
[
"in"
]
,
)
:
Promise
<
Extract
<
Router
,
{
cmd
:
Cmd
}
>
[
"out"
]
>
Type Parameters
Cmd
extends
string
Parameters
cmd
:
Cmd
args
:
Extract
<
Router
,
{
cmd
:
Cmd
}
>
[
"in"
]
Returns
Promise
<
Extract
<
Router
,
{
cmd
:
Cmd
}
>
[
"out"
]
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Methods
request
Github
Documentation
Loading...
Client type that provides type-safe request methods based on router inference