I'm trying to use DOMPurify in my Ionic-Vue app and it keeps giving me an error in the editor on the import statement despite having installed the types package for it properly, and at runtime the sanitize function is undefined when i try to call it despite the fact that i can see it when i console.log the DOMPurify object
Import:import * as DOMPurify from 'dompurify';
Use: text: DOMPurify.sanitize(await marked.parse(newReviewText.value))
Runtime error: Uncaught (in promise) TypeError: DOMPurify.sanitize is not a function sendReview Business.vue:94 patchStopImmediatePropagation runtime-dom.esm-bundler.js:613 callWithErrorHandling runtime-core.esm-bundler.js:158 callWithAsyncErrorHandling runtime-core.esm-bundler.js:166 callWithAsyncErrorHandling runtime-core.esm-bundler.js:176 invoker runtime-dom.esm-bundler.js:595 addEventListener runtime-dom.esm-bundler.js:549 patchEvent runtime-dom.esm-bundler.js:564 patchProp runtime-dom.esm-bundler.js:627 mountElement runtime-core.esm-bundler.js:5212 processElement runtime-core.esm-bundler.js:5159 patch runtime-core.esm-bundler.js:5031 componentUpdateFn runtime-core.esm-bundler.js:5711 run reactivity.esm-bundler.js:178 update runtime-core.esm-bundler.js:5817 setupRenderEffect runtime-core.esm-bundler.js:5825 mountComponent runtime-core.esm-bundler.js:5615 processComponent runtime-core.esm-bundler.js:5568 patch runtime-core.esm-bundler.js:5043 mountChildren runtime-core.esm-bundler.js:5287 mountElement runtime-core.esm-bundler.js:5194 processElement runtime-core.esm-bundler.js:5159 patch runtime-core.esm-bundler.js:5031 componentUpdateFn runtime-core.esm-bundler.js:5711 run reactivity.esm-bundler.js:178 update runtime-core.esm-bundler.js:5817 setupRenderEffect runtime-core.esm-bundler.js:5825 mountComponent runtime-core.esm-bundler.js:5615 processComponent runtime-core.esm-bundler.js:5568 patch runtime-core.esm-bundler.js:5043 mountChildren runtime-core.esm-bundler.js:5287 mountElement runtime-core.esm-bundler.js:5194 processElement runtime-core.esm-bundler.js:5159 patch runtime-core.esm-bundler.js:5031 componentUpdateFn runtime-core.esm-bundler.js:5711 run reactivity.esm-bundler.js:178
Editor compile-time error: Could not find a declaration file for module 'dompurify'. '/home/hazel/source/Web/Ionic/GlamBook/node_modules/dompurify/dist/purify.cjs.js' implicitly has an 'any' type. Try `npm i --save-dev @types/dompurify` if it exists or add a new declaration (.d.ts) file containing `declare module 'dompurify';
package.json relevant lines: ```json
"dependencies": {
...
"dompurify": "^3.0.6",
...
},
"devDependencies": {
...
"@types/dompurify": "^3.0.5",
...
}
