From 223796f61145b9c2318d13e20df732b036fa091a Mon Sep 17 00:00:00 2001 From: ArrayIterator Date: Tue, 15 Oct 2024 21:00:43 +0700 Subject: [PATCH] add expect require --- src/Gettext/Reader/XMLReader.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Gettext/Reader/XMLReader.ts b/src/Gettext/Reader/XMLReader.ts index 7489357..e5e0cd9 100644 --- a/src/Gettext/Reader/XMLReader.ts +++ b/src/Gettext/Reader/XMLReader.ts @@ -326,6 +326,8 @@ export default class XMLReader implements GettextReaderInterface { private parseFromString(content: string) : SimpleDocumentFragment|Document { let domParser : typeof DOMParser = (window?.DOMParser); if (!domParser) { + // noinspection TypeScriptUnresolvedReference + // @ts-expect-error ignore let _require = require || null; let jsDom = (_require ? _require('jsdom') : null)?.JSDOM; domParser = (typeof jsDom === 'function' ? (jsDom as {