Skip to content

Commit

Permalink
Merge pull request #1021 from asamuzaK/type
Browse files Browse the repository at this point in the history
Export DOMPurify interface
  • Loading branch information
cure53 authored Nov 14, 2024
2 parents 0d54293 + b8ccfde commit 983b436
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,7 +396,7 @@ 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 };

// @ts-ignore
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 983b436

Please sign in to comment.