diff --git a/dist/purify.cjs.d.ts b/dist/purify.cjs.d.ts index faf4ac23..ef602d9f 100644 --- a/dist/purify.cjs.d.ts +++ b/dist/purify.cjs.d.ts @@ -206,9 +206,9 @@ declare const _default: DOMPurify; interface DOMPurify { /** - * Creates a DOMPurify instance using the given window-like object. + * Creates a DOMPurify instance using the given window-like object. Defaults to `window`. */ - (root: WindowLike): DOMPurify; + (root?: WindowLike): DOMPurify; /** * Version label, exposed for easier checks * if DOMPurify is up to date or not diff --git a/dist/purify.es.d.mts b/dist/purify.es.d.mts index 4cb7625b..62f7f7f2 100644 --- a/dist/purify.es.d.mts +++ b/dist/purify.es.d.mts @@ -206,9 +206,9 @@ declare const _default: DOMPurify; interface DOMPurify { /** - * Creates a DOMPurify instance using the given window-like object. + * Creates a DOMPurify instance using the given window-like object. Defaults to `window`. */ - (root: WindowLike): DOMPurify; + (root?: WindowLike): DOMPurify; /** * Version label, exposed for easier checks * if DOMPurify is up to date or not diff --git a/src/purify.ts b/src/purify.ts index f85aa148..4143aa27 100644 --- a/src/purify.ts +++ b/src/purify.ts @@ -1679,9 +1679,9 @@ export default createDOMPurify(); export interface DOMPurify { /** - * Creates a DOMPurify instance using the given window-like object. + * Creates a DOMPurify instance using the given window-like object. Defaults to `window`. */ - (root: WindowLike): DOMPurify; + (root?: WindowLike): DOMPurify; /** * Version label, exposed for easier checks