Skip to content

Commit 0d54293

Browse files
authored
Merge pull request #1022 from ghiscoding/main
fix: ignore export assign cannot be used in module TS error, fixes #1018
2 parents 7ea9c61 + 3a5da80 commit 0d54293

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dist/purify.cjs.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,5 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
398398

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

401+
// @ts-ignore
401402
export = _default;

scripts/fix-cjs-types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const path = require('node:path');
2222
// Append `export = _default;` to match the
2323
// `module.exports = DOMPurify` statement
2424
// that Rollup creates.
25-
fixed += '\nexport = _default;\n';
25+
fixed += '\n// @ts-ignore\nexport = _default;\n';
2626

2727
await fs.writeFile(fileName, fixed);
2828
})().catch((ex) => {

0 commit comments

Comments
 (0)