mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 13:32:07 +07:00
9 lines
279 B
TypeScript
9 lines
279 B
TypeScript
declare type BrowserCallback<TReturn> = (params: {
|
|
window: typeof window;
|
|
}) => TReturn;
|
|
/**
|
|
* Safely runs code meant for browser environments only.
|
|
*/
|
|
export declare function safelyRunOnBrowser<TReturn>(callback: BrowserCallback<TReturn>): TReturn | undefined;
|
|
export {};
|