mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
56143277b7
* Expose window.GitBook to integrations * Simplify * Oups * Use basic script to load integrations * Preload the scripts
17 lines
479 B
TypeScript
17 lines
479 B
TypeScript
declare global {
|
|
type GitBookIntegrationEvent = 'load' | 'unload';
|
|
|
|
interface Window {
|
|
/**
|
|
* Global `window.GitBook` object accessible by integrations.
|
|
*/
|
|
GitBook?: {
|
|
events: Map<GitBookIntegrationEvent, Function[]>;
|
|
addEventListener: (type: GitBookIntegrationEvent, func: Function) => void;
|
|
removeEventListener: (type: GitBookIntegrationEvent, func: Function) => void;
|
|
};
|
|
}
|
|
}
|
|
|
|
export {};
|