rasengan
Version:
The modern React Framework
23 lines (22 loc) • 799 B
TypeScript
import { RouterProps, PageComponent } from '../types.js';
import { RouterComponent } from '../interfaces.js';
/**
* This function adds metadata to a router
* @param option
* @returns
*/
export declare const defineRouter: (option: RouterProps) => (Router: new () => RouterComponent) => Promise<RouterComponent>;
/**
* This function helps to convert the data provided by @rasenganjs/mdx into a PageComponent component
* The MDXPage arg has to follow exactly the type returned by the @rasenganjs/mdx plugin
* @param MDXPage
* @returns
*/
export declare const convertMDXPageToPageComponent: (MDXPage: {
type: string;
[key: string]: any;
}) => Promise<PageComponent>;
export declare const isMDXPage: (page: {
type: string;
[key: string]: any;
} | PageComponent<any>) => boolean;