@relax.dev/router
Version:
Router for VKUI
32 lines (31 loc) • 1.24 kB
TypeScript
/**
* @ignore
* @packageDocumentation
*/
import { Page } from './entities/Page';
import { RouteList, Router } from './entities/Router';
import { RouterConfig } from './entities/RouterConfig';
import { PageParams, RouterGenericBase } from './entities/Types';
import { Location } from './entities/Location';
/**
* @ignore
*/
export declare function preventBlinkingBySettingScrollRestoration(): void;
/**
* @ignore
* @param WrappedComponent
*/
export declare function getDisplayName(WrappedComponent: {
displayName?: string;
name?: string;
}): string;
export declare function isDesktopSafari(): boolean;
export declare function getTypedRouterElements<T extends RouterGenericBase = RouterGenericBase>(): {
createRouter: (routes: RouteList<T>, routerConfig?: RouterConfig<T> | null) => Router<T>;
createPage: (panelId?: T['panelId'], viewId?: T['viewId'], rootId?: T['rootId']) => Page<T>;
useRouter: (withUpdate?: boolean) => Router<T>;
useLocation: (withUpdate?: boolean, panelId?: T['panelId']) => Location<T>;
useFirstPageCheck: (withUpdate?: boolean, panelId?: T['panelId']) => boolean;
useParams: (panelId?: T['panelId']) => PageParams;
useThrottlingLocation: () => [Location<T>, () => void];
};