2020-03-29 22:31:42 +08:00

20 lines
403 B
TypeScript

import { ReactType } from 'react';
type HistoryMode = 'browser' | 'hash';
interface ComponentsMap {
[key: string]: ReactType;
}
interface UtilsMap {
[key: string]: any;
}
export interface AppConfig {
history?: HistoryMode;
globalComponents?: ComponentsMap;
globalUtils?: UtilsMap;
containerId?: string;
}
export function run(Component: any, config?: AppConfig | (() => AppConfig)): any;