@jakobcooldown/react-csr-sdk
Version:
Mockery SDK for dynamic bundle loading in web applications
21 lines (20 loc) • 680 B
TypeScript
/**
* Storage utilities for persisting bundle URLs
*/
export declare const storage: {
setBundleUrl(bundleUrl: string | undefined, storageKey?: string): void;
getBundleUrl(storageKey?: string): string | undefined;
clear(storageKey?: string): void;
};
/**
* Loads a bundle by dynamically adding script tags
*/
export declare function loadBundle(bundleUrl: string, debug?: boolean): Promise<void>;
/**
* Reloads the current page
*/
export declare function reloadPage(): void;
/**
* Debounce function to prevent rapid successive calls
*/
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;