mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 07:03:35 +08:00
34e0ab6100
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
11 lines
659 B
TypeScript
11 lines
659 B
TypeScript
import DefaultResolver from '../../common/resolvers/DefaultResolver';
|
|
import ExtensionPage, { ExtensionPageAttrs } from '../components/ExtensionPage';
|
|
/**
|
|
* A custom route resolver for ExtensionPage that generates handles routes
|
|
* to default extension pages or a page provided by an extension.
|
|
*/
|
|
export default class ExtensionPageResolver<Attrs extends ExtensionPageAttrs = ExtensionPageAttrs, RouteArgs extends Record<string, unknown> = {}> extends DefaultResolver<Attrs, ExtensionPage<Attrs>, RouteArgs> {
|
|
static extension: string | null;
|
|
onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string): new () => ExtensionPage<Attrs>;
|
|
}
|