react-js-plugins
Version:
A powerful and efficient React utility library designed to enhance application performance by streamlining and simplifying the management of complex asynchronous operations.
27 lines (26 loc) • 886 B
TypeScript
interface NavigateOptions {
replace?: boolean;
state?: Record<string, any> | null;
}
interface Location {
pathname: string;
state: Record<string, any> | null;
}
interface LocationChangeEventDetail {
path: string;
state: Record<string, any> | null;
}
declare global {
interface WindowEventMap {
locationchange: CustomEvent<LocationChangeEventDetail>;
}
}
export declare const _navigate: (path: string, options?: NavigateOptions) => void;
export declare const _go: (delta: number) => void;
export declare const _goBack: () => void;
export declare const _goForward: () => void;
export declare const _getCurrentPath: () => string;
export declare const _getCurrentState: () => Record<string, any> | null;
export declare const _getLocation: () => Location;
export declare const _getTypedState: <T extends Record<string, any>>() => T | null;
export {};