mirror of
https://github.com/flarum/framework.git
synced 2025-01-23 06:13:17 +08:00
cc29cf3e10
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
22 lines
803 B
TypeScript
22 lines
803 B
TypeScript
import type Mithril from 'mithril';
|
|
/**
|
|
* Generates a route resolver for a given component.
|
|
* In addition to regular route resolver functionality:
|
|
* - It provide the current route name as an attr
|
|
* - It sets a key on the component so a rerender will be triggered on route change.
|
|
*/
|
|
export default class DefaultResolver {
|
|
component: Mithril.Component;
|
|
routeName: string;
|
|
constructor(component: any, routeName: any);
|
|
/**
|
|
* When a route change results in a changed key, a full page
|
|
* rerender occurs. This method can be overriden in subclasses
|
|
* to prevent rerenders on some route changes.
|
|
*/
|
|
makeKey(): string;
|
|
makeAttrs(vnode: any): any;
|
|
onmatch(args: any, requestedPath: any, route: any): Mithril.Component<{}, {}>;
|
|
render(vnode: any): any[];
|
|
}
|