Skip to content

Commit

Permalink
Merge pull request #1028 from MiniDigger/optional-dompurify-argument-…
Browse files Browse the repository at this point in the history
…type

fix: mark createDOMPurify param as optional
  • Loading branch information
cure53 authored Nov 19, 2024
2 parents f93acff + 071771c commit 8e1c70a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/purify.cjs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dist/purify.es.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/purify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e1c70a

Please sign in to comment.