Functions: createExternalRoute()
Call Signature
ts
function createExternalRoute<THost, TName, TPath, TQuery, THash, TMeta>(options): Route<ToName<TName>, ToHost<THost>, ToPath<TPath>, ToQuery<TQuery>, ToHash<THash>, TMeta>
Type Parameters
Type Parameter | Default type |
---|---|
THost extends string | Host <string , Record <string , undefined | Param >> | - |
TName extends undefined | string | undefined |
TPath extends undefined | string | Path <string , Record <string , undefined | Param >> | undefined |
TQuery extends undefined | string | Query <string , Record <string , undefined | Param >> | undefined |
THash extends undefined | string | Hash <undefined | string > | undefined |
TMeta extends Record <string , unknown > | Record <string , unknown > |
Parameters
Parameter | Type |
---|---|
options | CreateRouteOptions <TName , TPath , TQuery , undefined | string | Hash <undefined | string >, Record <string , unknown >> & WithHost <THost > & WithoutParent |
Returns
Route
<ToName
<TName
>, ToHost
<THost
>, ToPath
<TPath
>, ToQuery
<TQuery
>, ToHash
<THash
>, TMeta
>
Call Signature
ts
function createExternalRoute<TParent, TName, TPath, TQuery, THash, TMeta>(options): Route<ToName<TName>, Host<"", {}>, CombinePath<TParent["path"], ToPath<TPath>>, CombineQuery<TParent["query"], ToQuery<TQuery>>, CombineHash<TParent["hash"], ToHash<THash>>, CombineMeta<TMeta, TParent["meta"]>>
Type Parameters
Type Parameter | Default type |
---|---|
TParent extends Route <string , Host <string , Record <string , undefined | Param >>, Path <string , Record <string , undefined | Param >>, Query <string , Record <string , undefined | Param >>, Hash <undefined | string >, Record <string , unknown >, Record <string , Param >, undefined | string > | - |
TName extends undefined | string | undefined |
TPath extends undefined | string | Path <string , Record <string , undefined | Param >> | undefined |
TQuery extends undefined | string | Query <string , Record <string , undefined | Param >> | undefined |
THash extends undefined | string | Hash <undefined | string > | undefined |
TMeta extends Record <string , unknown > | Record <string , unknown > |
Parameters
Parameter | Type |
---|---|
options | CreateRouteOptions <TName , TPath , TQuery , undefined | string | Hash <undefined | string >, Record <string , unknown >> & WithoutHost & WithParent <TParent > |
Returns
Route
<ToName
<TName
>, Host
<""
, {}>, CombinePath
<TParent
["path"
], ToPath
<TPath
>>, CombineQuery
<TParent
["query"
], ToQuery
<TQuery
>>, CombineHash
<TParent
["hash"
], ToHash
<THash
>>, CombineMeta
<TMeta
, TParent
["meta"
]>>