Skip to content

Commit

Permalink
Export DOMPurify interface
Browse files Browse the repository at this point in the history
Fix #1020
  • Loading branch information
asamuzaK committed Nov 14, 2024
1 parent 2cf6e25 commit b8ccfde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/purify.cjs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,6 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
trustedTypes?: typeof window.trustedTypes;
};

export { type Config, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike };
export { type Config, type DOMPurify, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike };

export = _default;
2 changes: 1 addition & 1 deletion dist/purify.es.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,4 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
trustedTypes?: typeof window.trustedTypes;
};

export { type Config, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike, _default as default };
export { type Config, type DOMPurify, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike, _default as default };
2 changes: 1 addition & 1 deletion src/purify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ function createDOMPurify(window: WindowLike = getGlobal()): DOMPurify {

export default createDOMPurify();

interface DOMPurify {
export interface DOMPurify {
/**
* Creates a DOMPurify instance using the given window-like object.
*/
Expand Down

0 comments on commit b8ccfde

Please sign in to comment.