@berish/mvc-router5-plugin
Version:
Router5 plugin for @berish/mvc-core
13 lines (12 loc) • 636 B
TypeScript
import React from 'react';
import { Router, State } from 'router5';
import { ControllerClass } from '@berish/mvc-core';
export declare type Router5ControllerMapType = [(string | number)[], ControllerClass][];
export interface PluginParams {
getRouter: () => Router;
mapPathItemsToController: Router5ControllerMapType;
convertPathItemsToPath?: (items: (string | number)[]) => string;
convertPathItemsToName?: (items: (string | number)[]) => string;
renderComponent?: (controllerClass: ControllerClass, state: State) => React.ReactNode;
}
export declare function getDefaultParams(params?: PluginParams): PluginParams;