infinity-forge
Version:
11 lines (10 loc) • 620 B
TypeScript
import { NextRouter } from 'next/router';
export declare function createRouterBuild(router: NextRouter): {
addRouteParam: (paramName: string, paramValue: string) => void;
updateRouteParam: (paramName: string, paramValue: string) => void;
removeRouteParam: (paramName: string, value: string) => void;
addRoutePath: (mainPath: string, path: string) => void;
updateRoutePath: (mainPath: string, newPath: string) => void;
removeRoutePath: (mainPath: string, value: string) => void;
switchRoute: (mainPath: string, path: string, removeParam: string, newParams: Record<string, string>) => void;
};