@promptbook/utils
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
12 lines (11 loc) • 585 B
TypeScript
import type { WindowLike as DomWindowLike } from 'dompurify';
/**
* Provides a DOM `window` for runtimes which do not have one, for example Node.js during server-side rendering
*
* Note: `$` is used to indicate that this function is not a pure function - it creates and caches one shared DOM window
*
* @returns DOM window which can back a DOM-dependent library like `DOMPurify`
* @throws {EnvironmentMismatchError} When the current runtime can not create a DOM window
* @private utility of `renderMarkdown`
*/
export declare function $provideServerDomWindow(): DomWindowLike;