mirror of
https://github.com/flarum/core.git
synced 2025-08-02 06:30:53 +02:00
fix: mark render method in RouteResolver as optional (#3235)
This commit is contained in:
@@ -106,14 +106,21 @@ export interface RouteResolver<
|
|||||||
*
|
*
|
||||||
* Returns the component class, and **not** a Vnode or JSX
|
* Returns the component class, and **not** a Vnode or JSX
|
||||||
* expression.
|
* expression.
|
||||||
|
*
|
||||||
|
* @see https://mithril.js.org/route.html#routeresolveronmatch
|
||||||
*/
|
*/
|
||||||
onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };
|
onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };
|
||||||
/**
|
/**
|
||||||
* A function which renders the provided component.
|
* A function which renders the provided component.
|
||||||
*
|
*
|
||||||
|
* If not specified, the route will default to rendering the
|
||||||
|
* component on its own, inside of a fragment.
|
||||||
|
*
|
||||||
* Returns a Mithril Vnode or other children.
|
* Returns a Mithril Vnode or other children.
|
||||||
|
*
|
||||||
|
* @see https://mithril.js.org/route.html#routeresolverrender
|
||||||
*/
|
*/
|
||||||
render(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;
|
render?(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user