Skip to content

Functions: createRoute()

ts
function createRoute<TOptions, TProps>(options, ...args): ToRoute<TOptions, CreateRouteProps<TOptions> extends TProps ? undefined : TProps>

Type Parameters

Type Parameter
TOptions extends CreateRouteOptions<undefined | string, | undefined | string | Path<string, Record<string, undefined | Param>>, | undefined | string | Query<string, Record<string, undefined | Param>>, undefined | string | Hash<undefined | string>, Record<string, unknown>>
TProps extends | PropsGetter<TOptions, any[any]> | RoutePropsRecord<TOptions, any[any]> | PropsGetter<TOptions, __VLS_WithTemplateSlots<DefineComponent<{ name: string; }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{ name: string; }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, Readonly<{ default: (props) => VNode; }> & object>>

Parameters

ParameterType
optionsTOptions
...argsCreateRouteWithProps<TOptions, TProps>

Returns

ToRoute<TOptions, CreateRouteProps<TOptions> extends TProps ? undefined : TProps>