Skip to content

Commit b8ccfde

Browse files
committed
Export DOMPurify interface
Fix #1020
1 parent 2cf6e25 commit b8ccfde

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/purify.cjs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,6 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
396396
trustedTypes?: typeof window.trustedTypes;
397397
};
398398

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

401401
export = _default;

dist/purify.es.d.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,4 +396,4 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
396396
trustedTypes?: typeof window.trustedTypes;
397397
};
398398

399-
export { type Config, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike, _default as default };
399+
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 };

src/purify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ function createDOMPurify(window: WindowLike = getGlobal()): DOMPurify {
16771677

16781678
export default createDOMPurify();
16791679

1680-
interface DOMPurify {
1680+
export interface DOMPurify {
16811681
/**
16821682
* Creates a DOMPurify instance using the given window-like object.
16831683
*/

0 commit comments

Comments
 (0)