framework/js/dist-typings/common/resolvers/DefaultResolver.d.ts
flarum-bot cc29cf3e10 Bundled output for commit 2831ce226c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-08-19 09:13:22 +00:00

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[];
}