Repository: remarkablemark/html-dom-parser
Pull request #527 (2023-10-16 04:54:02)

refactor: migrate to TypeScript
## What is the motivation for this pull request?

refactor: migrate to TypeScript

**BREAKING CHANGE**: CommonJS imports require the `.default` key.

## What is the current behavior?

Vanilla JavaScript

## What is the new behavior?

TypeScript

## Checklist:

- [x] [Conventional Commits](https://www.conventionalcommits.org/)
- [x] Tests
- [x] Types
- [x] Documentation

github-actions[bot]: ## size-limit report 📦 
| Path                        | Size                 | Loading time (3g)  | Running time (snapdragon) | Total time |
| --------------------------- | -------------------- | ------------------ | ------------------------- | ---------- |
| dist/html-dom-parser.min.js | 2.25 KB (-41.28% 🔽) | 45 ms (-41.28% 🔽) | 29 ms (+131.49% 🔺)       | 74 ms      |

Patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4b254f3..814af20 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -21,14 +21,14 @@ jobs:
       - name: Lint JavaScript
         run: npm run lint
 
-      - name: Test TypeScript declaration files
-        run: npm run lint:dts
+      - name: Type check
+        run: npm run lint:tsc
 
       - name: Run server test
         run: npm run test:server
 
       - name: Run module tests
-        run: npm run test:module
+        run: npm run test:esm
 
       - name: Run server test
         run: npm run test:server
diff --git a/.gitignore b/.gitignore
index 03a8182..fe69713 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 # Build directory
-dist
+dist/
+lib/
 
 # Logs
 logs
@@ -13,16 +14,16 @@ pids
 *.pid.lock
 
 # Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
+lib-cov/
 
 # Coverage directory used by tools like istanbul
-coverage
+coverage/
 
 # nyc test coverage
-.nyc_output
+.nyc_output/
 
 # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
+.grunt/
 
 # node-waf configuration
 .lock-wscript
@@ -31,11 +32,11 @@ coverage
 build/Release
 
 # Dependency directories
-node_modules
-jspm_packages
+node_modules/
+jspm_packages/
 
 # Optional npm cache directory
-.npm
+.npm/
 
 # Optional eslint cache
 .eslintcache
diff --git a/.prettierrc.json b/.prettierrc.json
index 074301b..544138b 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -1,5 +1,3 @@
 {
-  "arrowParens": "avoid",
-  "trailingComma": "none",
   "singleQuote": true
 }
diff --git a/README.md b/README.md
index 661a859..e53bae4 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,8 @@ The parser converts an HTML string to a JavaScript object that describes the DOM
 #### Example
 
 ```js
-const parse = require('html-dom-parser');
+import parse from 'html-dom-parser';
+
 parse('<p>Hello, World!</p>');
 ```
 
@@ -83,16 +84,16 @@ yarn add html-dom-parser
 
 ## Usage
 
-Import the module with ES Modules:
+Import with ES Modules:
 
 ```js
 import parse from 'html-dom-parser';
 ```
 
-Or require the module with CommonJS:
+Require with CommonJS:
 
 ```js
-const parse = require('html-dom-parser');
+const parse = require('html-dom-parser').default;
 ```
 
 Parse empty string:
@@ -179,24 +180,24 @@ Because the server parser is a wrapper of [htmlparser2](https://github.com/fb55/
  * should be combined into a single object like so:
  */
 const options = {
-    /**
-     * Options for the domhandler class.
-     * https://github.com/fb55/domhandler/blob/master/src/index.ts#L16
-     */
-    withStartIndices: false,
-    withEndIndices: false,
-    xmlMode: false,
-    /**
-     * Options for the htmlparser2 class.
-     * https://github.com/fb55/htmlparser2/blob/master/src/Parser.ts#L104
-     */ 
-    xmlMode: false, // Will overwrite what is used for the domhandler, otherwise inherited.
-    decodeEntities: true,
-    lowerCaseTags: true, // !xmlMode by default
-    lowerCaseAttributeNames: true, // !xmlMode by default
-    recognizeCDATA: false, // xmlMode by default
-    recognizeSelfClosing: false, // xmlMode by default
-    Tokenizer: Tokenizer
+  /**
+   * Options for the domhandler class.
+   * https://github.com/fb55/domhandler/blob/master/src/index.ts#L16
+   */
+  withStartIndices: false,
+  withEndIndices: false,
+  xmlMode: false,
+  /**
+   * Options for the htmlparser2 class.
+   * https://github.com/fb55/htmlparser2/blob/master/src/Parser.ts#L104
+   */
+  xmlMode: false, // Will overwrite what is used for the domhandler, otherwise inherited.
+  decodeEntities: true,
+  lowerCaseTags: true, // !xmlMode by default
+  lowerCaseAttributeNames: true, // !xmlMode by default
+  recognizeCDATA: false, // xmlMode by default
+  recognizeSelfClosing: false, // xmlMode by default
+  Tokenizer: Tokenizer,
 };
 ```
 
@@ -204,35 +205,16 @@ If you are parsing HTML with SVG code you can set `lowerCaseTags` to `true` with
 
 > **Note**: If you are parsing code client-side (in-browser), you can not control the parsing options. Client-side parsing automatically handles returning some HTML tags in camel-case, such as specific SVG elements, but returns all other tags lowercased according to the HTML standard.
 
-## Testing
-
-Run server and client tests:
-
-```sh
-npm test
-```
-
-Generate HTML coverage report for server tests:
-
-```sh
-npx nyc report --reporter=html
-```
-
-Lint files:
+## Migration
 
-```sh
-npm run lint
-npm run lint:fix
-```
+### v5
 
-Test TypeScript declaration file for style and correctness:
+Migrated to TypeScript. CommonJS imports require the `.default` key:
 
-```sh
-npm run lint:dts
+```js
+const parse = require('html-dom-parser').default;
 ```
 
-## Migration
-
 ### v4
 
 Upgraded [htmlparser2](https://github.com/fb55/htmlparser2) to v9.
diff --git a/esm/client/html-to-dom.mjs b/esm/client/html-to-dom.mjs
new file mode 100644
index 0000000..4cfac7b
--- /dev/null
+++ b/esm/client/html-to-dom.mjs
@@ -0,0 +1,3 @@
+import ClientParser from '../../lib/client/html-to-dom.js';
+
+export default ClientParser.default;
diff --git a/esm/index.mjs b/esm/index.mjs
new file mode 100644
index 0000000..6ded853
--- /dev/null
+++ b/esm/index.mjs
@@ -0,0 +1,3 @@
+import HTMLDOMParser from '../lib/index.js';
+
+export default HTMLDOMParser.default;
diff --git a/esm/server/html-to-dom.mjs b/esm/server/html-to-dom.mjs
new file mode 100644
index 0000000..3e1bfc8
--- /dev/null
+++ b/esm/server/html-to-dom.mjs
@@ -0,0 +1,3 @@
+import ServerParser from '../../lib/server/html-to-dom.js';
+
+export default ServerParser.default;
diff --git a/index.d.ts b/index.d.ts
deleted file mode 100644
index f3a51e8..0000000
--- a/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// TypeScript Version: 5.2
-
-export { default } from './lib/server/html-to-dom';
diff --git a/index.mjs b/index.mjs
deleted file mode 100644
index fdb5257..0000000
--- a/index.mjs
+++ /dev/null
@@ -1,3 +0,0 @@
-import HTMLDOMParser from './index.js';
-
-export default HTMLDOMParser;
diff --git a/karma.conf.js b/karma.conf.js
index 0f8730f..99881f9 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -1,6 +1,7 @@
-// Karma configuration
-// https://karma-runner.github.io/5.2/config/configuration-file.html
-module.exports = config => {
+/**
+ * @see https://karma-runner.github.io/6.4/config/configuration-file.html
+ */
+module.exports = (config) => {
   config.set({
     // base path that will be used to resolve all patterns (eg. files, exclude)
     basePath: '',
@@ -16,7 +17,7 @@ module.exports = config => {
       'lib/server/utilities.js',
       'test/cases/html.js',
       'test/client/*.js',
-      'test/helpers/*.js'
+      'test/helpers/*.js',
     ],
 
     // list of files / patterns to exclude
@@ -27,7 +28,7 @@ module.exports = config => {
     preprocessors: {
       'dist/*.js': ['commonjs'],
       'lib/**/*.js': ['commonjs'],
-      'test/**/*.js': ['commonjs']
+      'test/**/*.js': ['commonjs'],
     },
 
     // test results reporter to use
@@ -74,14 +75,14 @@ module.exports = config => {
     client: {
       mocha: {
         // change Karma's `debug.html` to the Mocha web reporter
-        reporter: 'html'
-      }
+        reporter: 'html',
+      },
     },
 
     // Mocha reporter options
     // https://www.npmjs.com/package/karma-mocha-reporter
     mochaReporter: {
-      showDiff: true
-    }
+      showDiff: true,
+    },
   });
 };
diff --git a/lib/client/constants.d.ts b/lib/client/constants.d.ts
index 2a52b60..dd0aa62 100644
--- a/lib/client/constants.d.ts
+++ b/lib/client/constants.d.ts
@@ -1,6 +1,8 @@
 /**
- * SVG elements, unlike HTML elements, are case-sensitive.
+ * SVG elements are case-sensitive.
  *
- * {@link https://developer.mozilla.org/docs/Web/SVG/Element#SVG_elements_A_to_Z}
+ * @see https://developer.mozilla.org/docs/Web/SVG/Element#svg_elements_a_to_z
  */
-export const CASE_SENSITIVE_TAG_NAMES: string[];
+export declare const CASE_SENSITIVE_TAG_NAMES: readonly ["animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "linearGradient", "radialGradient", "textPath"];
+export declare const CASE_SENSITIVE_TAG_NAMES_MAP: Record<string, string>;
+//# sourceMappingURL=constants.d.ts.map
\ No newline at end of file
diff --git a/lib/client/constants.js b/lib/client/constants.js
index ec07de4..a2bf77e 100644
--- a/lib/client/constants.js
+++ b/lib/client/constants.js
@@ -1,38 +1,46 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES = void 0;
 /**
  * SVG elements are case-sensitive.
  *
- * @see {@link https://developer.mozilla.org/docs/Web/SVG/Element#svg_elements_a_to_z}
+ * @see https://developer.mozilla.org/docs/Web/SVG/Element#svg_elements_a_to_z
  */
 exports.CASE_SENSITIVE_TAG_NAMES = [
-  'animateMotion',
-  'animateTransform',
-  'clipPath',
-  'feBlend',
-  'feColorMatrix',
-  'feComponentTransfer',
-  'feComposite',
-  'feConvolveMatrix',
-  'feDiffuseLighting',
-  'feDisplacementMap',
-  'feDropShadow',
-  'feFlood',
-  'feFuncA',
-  'feFuncB',
-  'feFuncG',
-  'feFuncR',
-  'feGaussianBlur',
-  'feImage',
-  'feMerge',
-  'feMergeNode',
-  'feMorphology',
-  'feOffset',
-  'fePointLight',
-  'feSpecularLighting',
-  'feSpotLight',
-  'feTile',
-  'feTurbulence',
-  'foreignObject',
-  'linearGradient',
-  'radialGradient',
-  'textPath'
+    'animateMotion',
+    'animateTransform',
+    'clipPath',
+    'feBlend',
+    'feColorMatrix',
+    'feComponentTransfer',
+    'feComposite',
+    'feConvolveMatrix',
+    'feDiffuseLighting',
+    'feDisplacementMap',
+    'feDropShadow',
+    'feFlood',
+    'feFuncA',
+    'feFuncB',
+    'feFuncG',
+    'feFuncR',
+    'feGaussianBlur',
+    'feImage',
+    'feMerge',
+    'feMergeNode',
+    'feMorphology',
+    'feOffset',
+    'fePointLight',
+    'feSpecularLighting',
+    'feSpotLight',
+    'feTile',
+    'feTurbulence',
+    'foreignObject',
+    'linearGradient',
+    'radialGradient',
+    'textPath',
 ];
+exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES.reduce(function (accumulator, tagName) {
+    accumulator[tagName.toLowerCase()] = tagName;
+    return accumulator;
+}, {});
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/lib/client/domparser.d.ts b/lib/client/domparser.d.ts
index 6ca32fd..c603c58 100644
--- a/lib/client/domparser.d.ts
+++ b/lib/client/domparser.d.ts
@@ -2,6 +2,7 @@
  * Parses HTML string to DOM nodes.
  *
  * @param html - HTML markup.
- * @returns - NodeList.
+ * @returns - DOM nodes.
  */
 export default function domparser(html: string): NodeList;
+//# sourceMappingURL=domparser.d.ts.map
\ No newline at end of file
diff --git a/lib/client/domparser.js b/lib/client/domparser.js
index 178b1dd..ffc14af 100644
--- a/lib/client/domparser.js
+++ b/lib/client/domparser.js
@@ -1,3 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
 // constants
 var HTML = 'html';
 var HEAD = 'head';
@@ -6,158 +8,128 @@ var FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; // e.g., <h1>
 // match-all-characters in case of newlines (DOTALL)
 var HEAD_TAG_REGEX = /<head[^]*>/i;
 var BODY_TAG_REGEX = /<body[^]*>/i;
-
 // falls back to `parseFromString` if `createHTMLDocument` cannot be used
-var parseFromDocument = function () {
-  throw new Error(
-    'This browser does not support `document.implementation.createHTMLDocument`'
-  );
+// eslint-disable-next-line no-unused-vars
+var parseFromDocument = function (html, tagName) {
+    throw new Error('This browser does not support `document.implementation.createHTMLDocument`');
 };
-
-var parseFromString = function () {
-  throw new Error(
-    'This browser does not support `DOMParser.prototype.parseFromString`'
-  );
+// eslint-disable-next-line no-unused-vars
+var parseFromString = function (html, tagName) {
+    throw new Error('This browser does not support `DOMParser.prototype.parseFromString`');
 };
-
 var DOMParser = typeof window === 'object' && window.DOMParser;
-
 /**
  * DOMParser (performance: slow).
  *
  * @see https://developer.mozilla.org/docs/Web/API/DOMParser#Parsing_an_SVG_or_HTML_document
  */
 if (typeof DOMParser === 'function') {
-  var domParser = new DOMParser();
-  var mimeType = 'text/html';
-
-  /**
-   * Creates an HTML document using `DOMParser.parseFromString`.
-   *
-   * @param  {string} html      - The HTML string.
-   * @param  {string} [tagName] - The element to render the HTML (with 'body' as fallback).
-   * @return {HTMLDocument}
-   */
-  parseFromString = function (html, tagName) {
-    if (tagName) {
-      html = '<' + tagName + '>' + html + '</' + tagName + '>';
-    }
-
-    return domParser.parseFromString(html, mimeType);
-  };
-
-  parseFromDocument = parseFromString;
+    var domParser_1 = new DOMParser();
+    var mimeType_1 = 'text/html';
+    /**
+     * Creates an HTML document using `DOMParser.parseFromString`.
+     *
+     * @param html - The HTML string.
+     * @param tagName - The element to render the HTML (with 'body' as fallback).
+     * @returns - Document.
+     */
+    parseFromString = function (html, tagName) {
+        if (tagName) {
+            html = "<".concat(tagName, ">").concat(html, "</").concat(tagName, ">");
+        }
+        return domParser_1.parseFromString(html, mimeType_1);
+    };
+    parseFromDocument = parseFromString;
 }
-
 /**
  * DOMImplementation (performance: fair).
  *
  * @see https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument
  */
 if (typeof document === 'object' && document.implementation) {
-  var doc = document.implementation.createHTMLDocument();
-
-  /**
-   * Use HTML document created by `document.implementation.createHTMLDocument`.
-   *
-   * @param  {string} html      - The HTML string.
-   * @param  {string} [tagName] - The element to render the HTML (with 'body' as fallback).
-   * @return {HTMLDocument}
-   */
-  parseFromDocument = function (html, tagName) {
-    if (tagName) {
-      var element = doc.documentElement.querySelector(tagName);
-      element.innerHTML = html;
-      return doc;
-    }
-
-    doc.documentElement.innerHTML = html;
-    return doc;
-  };
+    var htmlDocument_1 = document.implementation.createHTMLDocument();
+    /**
+     * Use HTML document created by `document.implementation.createHTMLDocument`.
+     *
+     * @param html - The HTML string.
+     * @param tagName - The element to render the HTML (with 'body' as fallback).
+     * @returns - Document
+     */
+    parseFromDocument = function (html, tagName) {
+        if (tagName) {
+            var element = htmlDocument_1.documentElement.querySelector(tagName);
+            if (element) {
+                element.innerHTML = html;
+            }
+            return htmlDocument_1;
+        }
+        htmlDocument_1.documentElement.innerHTML = html;
+        return htmlDocument_1;
+    };
 }
-
 /**
  * Template (performance: fast).
  *
  * @see https://developer.mozilla.org/docs/Web/HTML/Element/template
  */
-var template =
-  typeof document === 'object' ? document.createElement('template') : {};
-
+var template = typeof document === 'object' && document.createElement('template');
+// eslint-disable-next-line no-unused-vars
 var parseFromTemplate;
-
-if (template.content) {
-  /**
-   * Uses a template element (content fragment) to parse HTML.
-   *
-   * @param  {string} html - The HTML string.
-   * @return {NodeList}
-   */
-  parseFromTemplate = function (html) {
-    template.innerHTML = html;
-    return template.content.childNodes;
-  };
+if (template && template.content) {
+    /**
+     * Uses a template element (content fragment) to parse HTML.
+     *
+     * @param html - HTML string.
+     * @returns - Nodes.
+     */
+    parseFromTemplate = function (html) {
+        template.innerHTML = html;
+        return template.content.childNodes;
+    };
 }
-
 /**
  * Parses HTML string to DOM nodes.
  *
- * @param  {string}   html - HTML markup.
- * @return {NodeList}
+ * @param html - HTML markup.
+ * @returns - DOM nodes.
  */
 function domparser(html) {
-  var firstTagName;
-  var match = html.match(FIRST_TAG_REGEX);
-
-  if (match && match[1]) {
-    firstTagName = match[1].toLowerCase();
-  }
-
-  var doc;
-  var element;
-  var elements;
-
-  switch (firstTagName) {
-    case HTML:
-      doc = parseFromString(html);
-
-      // the created document may come with filler head/body elements,
-      // so make sure to remove them if they don't actually exist
-      if (!HEAD_TAG_REGEX.test(html)) {
-        element = doc.querySelector(HEAD);
-        if (element) {
-          element.parentNode.removeChild(element);
+    var _a, _b;
+    var match = html.match(FIRST_TAG_REGEX);
+    var firstTagName = match && match[1] ? match[1].toLowerCase() : '';
+    switch (firstTagName) {
+        case HTML: {
+            var doc = parseFromString(html);
+            // the created document may come with filler head/body elements,
+            // so make sure to remove them if they don't actually exist
+            if (!HEAD_TAG_REGEX.test(html)) {
+                var element = doc.querySelector(HEAD);
+                (_a = element === null || element === void 0 ? void 0 : element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
+            }
+            if (!BODY_TAG_REGEX.test(html)) {
+                var element = doc.querySelector(BODY);
+                (_b = element === null || element === void 0 ? void 0 : element.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(element);
+            }
+            return doc.querySelectorAll(HTML);
+        }
+        case HEAD:
+        case BODY: {
+            var elements = parseFromDocument(html).querySelectorAll(firstTagName);
+            // if there's a sibling element, then return both elements
+            if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) {
+                return elements[0].parentNode.childNodes;
+            }
+            return elements;
         }
-      }
-
-      if (!BODY_TAG_REGEX.test(html)) {
-        element = doc.querySelector(BODY);
-        if (element) {
-          element.parentNode.removeChild(element);
+        // low-level tag or text
+        default: {
+            if (parseFromTemplate) {
+                return parseFromTemplate(html);
+            }
+            var element = parseFromDocument(html, BODY).querySelector(BODY);
+            return element.childNodes;
         }
-      }
-
-      return doc.querySelectorAll(HTML);
-
-    case HEAD:
-    case BODY:
-      doc = parseFromDocument(html);
-      elements = doc.querySelectorAll(firstTagName);
-
-      // if there's a sibling element, then return both elements
-      if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) {
-        return elements[0].parentNode.childNodes;
-      }
-      return elements;
-
-    // low-level tag or text
-    default:
-      if (parseFromTemplate) {
-        return parseFromTemplate(html);
-      }
-      element = parseFromDocument(html, BODY).querySelector(BODY);
-      return element.childNodes;
-  }
+    }
 }
-
-module.exports = domparser;
+exports.default = domparser;
+//# sourceMappingURL=domparser.js.map
\ No newline at end of file
diff --git a/lib/client/html-to-dom.d.ts b/lib/client/html-to-dom.d.ts
index 416de78..8f09420 100644
--- a/lib/client/html-to-dom.d.ts
+++ b/lib/client/html-to-dom.d.ts
@@ -1,9 +1,8 @@
-import { DataNode, Element } from 'domhandler';
-
 /**
  * Parses HTML string to DOM nodes in browser.
  *
  * @param html - HTML markup.
  * @returns - DOM elements.
  */
-export default function HTMLDOMParser(html: string): Array<DataNode | Element>;
+export default function HTMLDOMParser(html: string): (import("domhandler").Element | import("domhandler").Text | import("domhandler").Comment | import("domhandler").ProcessingInstruction)[];
+//# sourceMappingURL=html-to-dom.d.ts.map
\ No newline at end of file
diff --git a/lib/client/html-to-dom.js b/lib/client/html-to-dom.js
index 7db803d..a44efed 100644
--- a/lib/client/html-to-dom.js
+++ b/lib/client/html-to-dom.js
@@ -1,34 +1,28 @@
-var domparser = require('./domparser');
-var utilities = require('./utilities');
-
-var formatDOM = utilities.formatDOM;
-
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+    return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var domparser_1 = __importDefault(require("./domparser"));
+var utilities_1 = require("./utilities");
 var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/; // e.g., <!doctype html>
-
 /**
  * Parses HTML string to DOM nodes in browser.
  *
- * @param  {string} html  - HTML markup.
- * @return {DomElement[]} - DOM elements.
+ * @param html - HTML markup.
+ * @returns - DOM elements.
  */
 function HTMLDOMParser(html) {
-  if (typeof html !== 'string') {
-    throw new TypeError('First argument must be a string');
-  }
-
-  if (html === '') {
-    return [];
-  }
-
-  // match directive
-  var match = html.match(DIRECTIVE_REGEX);
-  var directive;
-
-  if (match && match[1]) {
-    directive = match[1];
-  }
-
-  return formatDOM(domparser(html), null, directive);
+    if (typeof html !== 'string') {
+        throw new TypeError('First argument must be a string');
+    }
+    if (html === '') {
+        return [];
+    }
+    // match directive
+    var match = html.match(DIRECTIVE_REGEX);
+    var directive = match ? match[1] : undefined;
+    return (0, utilities_1.formatDOM)((0, domparser_1.default)(html), null, directive);
 }
-
-module.exports = HTMLDOMParser;
+exports.default = HTMLDOMParser;
+//# sourceMappingURL=html-to-dom.js.map
\ No newline at end of file
diff --git a/lib/client/html-to-dom.mjs b/lib/client/html-to-dom.mjs
deleted file mode 100644
index ec39bb0..0000000
--- a/lib/client/html-to-dom.mjs
+++ /dev/null
@@ -1,32 +0,0 @@
-import domparser from './domparser.js';
-import utilities from './utilities.js';
-
-var formatDOM = utilities.formatDOM;
-
-var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/; // e.g., <!doctype html>
-
-/**
- * Parses HTML string to DOM nodes in browser.
- *
- * @param  {string} html  - HTML markup.
- * @return {DomElement[]} - DOM elements.
- */
-export default function HTMLDOMParser(html) {
-  if (typeof html !== 'string') {
-    throw new TypeError('First argument must be a string');
-  }
-
-  if (html === '') {
-    return [];
-  }
-
-  // match directive
-  var match = html.match(DIRECTIVE_REGEX);
-  var directive;
-
-  if (match && match[1]) {
-    directive = match[1];
-  }
-
-  return formatDOM(domparser(html), null, directive);
-}
diff --git a/lib/client/utilities.d.ts b/lib/client/utilities.d.ts
index ad996b7..a5ff3c4 100644
--- a/lib/client/utilities.d.ts
+++ b/lib/client/utilities.d.ts
@@ -1,25 +1,18 @@
 import { Comment, Element, ProcessingInstruction, Text } from 'domhandler';
-
 /**
  * Formats DOM attributes to a hash map.
  *
  * @param attributes - List of attributes.
  * @returns - Map of attribute name to value.
  */
-export function formatAttributes(
-  attributes: NamedNodeMap
-): Record<string, string>;
-
+export declare function formatAttributes(attributes: NamedNodeMap): Record<string, string>;
 /**
  * Transforms DOM nodes to `domhandler` nodes.
  *
- * @param  nodes     - DOM nodes.
- * @param  parent    - Parent node.
- * @param  directive - Directive.
- * @return           - Nodes.
+ * @param nodes - DOM nodes.
+ * @param parent - Parent node.
+ * @param directive - Directive.
+ * @returns - Nodes.
  */
-export function formatDOM(
-  nodes: NodeList,
-  parent?: Element | null,
-  directive?: string
-): Array<Comment | Element | ProcessingInstruction | Text>;
+export declare function formatDOM(nodes: NodeList, parent?: Element | null, directive?: string): (Comment | Element | ProcessingInstruction | Text)[];
+//# sourceMappingURL=utilities.d.ts.map
\ No newline at end of file
diff --git a/lib/client/utilities.js b/lib/client/utilities.js
index d96990f..fc47872 100644
--- a/lib/client/utilities.js
+++ b/lib/client/utilities.js
@@ -1,136 +1,109 @@
-var domhandler = require('domhandler');
-var constants = require('./constants');
-
-var CASE_SENSITIVE_TAG_NAMES = constants.CASE_SENSITIVE_TAG_NAMES;
-
-var Comment = domhandler.Comment;
-var Element = domhandler.Element;
-var ProcessingInstruction = domhandler.ProcessingInstruction;
-var Text = domhandler.Text;
-
-var caseSensitiveTagNamesMap = {};
-var tagName;
-
-for (var i = 0, len = CASE_SENSITIVE_TAG_NAMES.length; i < len; i++) {
-  tagName = CASE_SENSITIVE_TAG_NAMES[i];
-  caseSensitiveTagNamesMap[tagName.toLowerCase()] = tagName;
-}
-
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.formatDOM = exports.formatAttributes = void 0;
+var domhandler_1 = require("domhandler");
+var constants_1 = require("./constants");
 /**
  * Gets case-sensitive tag name.
  *
- * @param {string} tagName - Tag name in lowercase.
- * @returns {string|undefined} - Case-sensitive tag name.
+ * @param tagName - Tag name in lowercase.
+ * @returns - Case-sensitive tag name.
  */
 function getCaseSensitiveTagName(tagName) {
-  return caseSensitiveTagNamesMap[tagName];
+    return constants_1.CASE_SENSITIVE_TAG_NAMES_MAP[tagName];
 }
-
 /**
  * Formats DOM attributes to a hash map.
  *
- * @param {NamedNodeMap} attributes - List of attributes.
- * @returns {object} - Map of attribute name to value.
+ * @param attributes - List of attributes.
+ * @returns - Map of attribute name to value.
  */
 function formatAttributes(attributes) {
-  var result = {};
-  var attribute;
-  // `NamedNodeMap` is array-like
-  for (var i = 0, len = attributes.length; i < len; i++) {
-    attribute = attributes[i];
-    result[attribute.name] = attribute.value;
-  }
-  return result;
+    var map = {};
+    var index = 0;
+    var attributesLength = attributes.length;
+    // `NamedNodeMap` is array-like
+    for (; index < attributesLength; index++) {
+        var attribute = attributes[index];
+        map[attribute.name] = attribute.value;
+    }
+    return map;
 }
-
+exports.formatAttributes = formatAttributes;
 /**
  * Corrects the tag name if it is case-sensitive (SVG).
  * Otherwise, returns the lowercase tag name (HTML).
  *
- * @param {string} tagName - Lowercase tag name.
- * @returns {string} - Formatted tag name.
+ * @param tagName - Lowercase tag name.
+ * @returns - Formatted tag name.
  */
 function formatTagName(tagName) {
-  tagName = tagName.toLowerCase();
-  var caseSensitiveTagName = getCaseSensitiveTagName(tagName);
-  if (caseSensitiveTagName) {
-    return caseSensitiveTagName;
-  }
-  return tagName;
+    tagName = tagName.toLowerCase();
+    var caseSensitiveTagName = getCaseSensitiveTagName(tagName);
+    if (caseSensitiveTagName) {
+        return caseSensitiveTagName;
+    }
+    return tagName;
 }
-
 /**
  * Transforms DOM nodes to `domhandler` nodes.
  *
- * @param {NodeList} nodes - DOM nodes.
- * @param {Element|null} [parent=null] - Parent node.
- * @param {string} [directive] - Directive.
- * @returns {Array<Comment|Element|ProcessingInstruction|Text>}
+ * @param nodes - DOM nodes.
+ * @param parent - Parent node.
+ * @param directive - Directive.
+ * @returns - Nodes.
  */
 function formatDOM(nodes, parent, directive) {
-  parent = parent || null;
-  var result = [];
-  var tagName;
-
-  for (var index = 0, len = nodes.length; index < len; index++) {
-    var node = nodes[index];
+    if (parent === void 0) { parent = null; }
+    var result = [];
     var current;
-
-    // set the node data given the type
-    switch (node.nodeType) {
-      case 1:
-        tagName = formatTagName(node.nodeName);
-        // script, style, or tag
-        current = new Element(tagName, formatAttributes(node.attributes));
-        current.children = formatDOM(
-          // template children are on content
-          tagName === 'template' ? node.content.childNodes : node.childNodes,
-          current
-        );
-        break;
-
-      case 3:
-        current = new Text(node.nodeValue);
-        break;
-
-      case 8:
-        current = new Comment(node.nodeValue);
-        break;
-
-      default:
-        continue;
-    }
-
-    // set previous node next
-    var prev = result[index - 1] || null;
-    if (prev) {
-      prev.next = current;
+    var index = 0;
+    var nodesLength = nodes.length;
+    for (; index < nodesLength; index++) {
+        var node = nodes[index];
+        // set the node data given the type
+        switch (node.nodeType) {
+            case 1: {
+                var tagName = formatTagName(node.nodeName);
+                // script, style, or tag
+                current = new domhandler_1.Element(tagName, formatAttributes(node.attributes));
+                current.children = formatDOM(
+                // template children are on content
+                tagName === 'template'
+                    ? node.content.childNodes
+                    : node.childNodes, current);
+                break;
+            }
+            case 3:
+                current = new domhandler_1.Text(node.nodeValue);
+                break;
+            case 8:
+                current = new domhandler_1.Comment(node.nodeValue);
+                break;
+            default:
+                continue;
+        }
+        // set previous node next
+        var prev = result[index - 1] || null;
+        if (prev) {
+            prev.next = current;
+        }
+        // set properties for current node
+        current.parent = parent;
+        current.prev = prev;
+        current.next = null;
+        result.push(current);
     }
-
-    // set properties for current node
-    current.parent = parent;
-    current.prev = prev;
-    current.next = null;
-
-    result.push(current);
-  }
-
-  if (directive) {
-    current = new ProcessingInstruction(
-      directive.substring(0, directive.indexOf(' ')).toLowerCase(),
-      directive
-    );
-    current.next = result[0] || null;
-    current.parent = parent;
-    result.unshift(current);
-
-    if (result[1]) {
-      result[1].prev = result[0];
+    if (directive) {
+        current = new domhandler_1.ProcessingInstruction(directive.substring(0, directive.indexOf(' ')).toLowerCase(), directive);
+        current.next = result[0] || null;
+        current.parent = parent;
+        result.unshift(current);
+        if (result[1]) {
+            result[1].prev = result[0];
+        }
     }
-  }
-
-  return result;
+    return result;
 }
-
-exports.formatAttributes = formatAttributes;
 exports.formatDOM = formatDOM;
+//# sourceMappingURL=utilities.js.map
\ No newline at end of file
diff --git a/lib/server/html-to-dom.d.ts b/lib/server/html-to-dom.d.ts
index 2c7a457..ca4627c 100644
--- a/lib/server/html-to-dom.d.ts
+++ b/lib/server/html-to-dom.d.ts
@@ -1,24 +1,15 @@
-import {
-  Comment,
-  DomHandlerOptions,
-  Element,
-  ProcessingInstruction,
-  Text
-} from 'domhandler';
-
+import type { DomHandlerOptions } from 'domhandler';
 /**
  * Parses HTML string to DOM nodes in Node.js.
  *
  * This is the same method as `require('htmlparser2').parseDOM`
  *
- * @see https://github.com/fb55/htmlparser2/blob/v9.0.0/src/index.ts#L34-L46
+ * @see https://github.com/fb55/htmlparser2/blob/v9.0.0/src/index.ts#L44-L46
  * @see https://github.com/fb55/domhandler/tree/v5.0.3#readme
  *
  * @param html - HTML markup.
  * @param options - Parser options.
  * @returns - DOM nodes.
  */
-export default function HTMLDOMParser(
-  html: string,
-  options?: DomHandlerOptions
-): Array<Comment | Element | ProcessingInstruction | Text>;
+export default function HTMLDOMParser(html: string, options?: DomHandlerOptions): (import("domhandler").Element | import("domhandler").Text | import("domhandler").Comment | import("domhandler").ProcessingInstruction)[];
+//# sourceMappingURL=html-to-dom.d.ts.map
\ No newline at end of file
diff --git a/lib/server/html-to-dom.js b/lib/server/html-to-dom.js
index bcc5275..a5558ef 100644
--- a/lib/server/html-to-dom.js
+++ b/lib/server/html-to-dom.js
@@ -1,30 +1,30 @@
-var Parser = require('htmlparser2').Parser;
-var DomHandler = require('domhandler').DomHandler;
-
-var unsetRootParent = require('./utilities').unsetRootParent;
-
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var htmlparser2_1 = require("htmlparser2");
+var domhandler_1 = require("domhandler");
+var utilities_1 = require("./utilities");
 /**
  * Parses HTML string to DOM nodes in Node.js.
  *
  * This is the same method as `require('htmlparser2').parseDOM`
- * https://github.com/fb55/htmlparser2/blob/v6.0.0/src/index.ts#L29-L41
  *
- * @param  {string}            html      - HTML markup.
- * @param  {DomHandlerOptions} [options] - Parser options (https://github.com/fb55/domhandler/tree/v4.0.0#readme).
- * @return {Array<Comment|Element|ProcessingInstruction|Text>} - DOM nodes.
+ * @see https://github.com/fb55/htmlparser2/blob/v9.0.0/src/index.ts#L44-L46
+ * @see https://github.com/fb55/domhandler/tree/v5.0.3#readme
+ *
+ * @param html - HTML markup.
+ * @param options - Parser options.
+ * @returns - DOM nodes.
  */
 function HTMLDOMParser(html, options) {
-  if (typeof html !== 'string') {
-    throw new TypeError('First argument must be a string.');
-  }
-
-  if (html === '') {
-    return [];
-  }
-
-  var handler = new DomHandler(undefined, options);
-  new Parser(handler, options).end(html);
-  return unsetRootParent(handler.dom);
+    if (typeof html !== 'string') {
+        throw new TypeError('First argument must be a string.');
+    }
+    if (html === '') {
+        return [];
+    }
+    var handler = new domhandler_1.DomHandler(undefined, options);
+    new htmlparser2_1.Parser(handler, options).end(html);
+    return (0, utilities_1.unsetRootParent)(handler.dom);
 }
-
-module.exports = HTMLDOMParser;
+exports.default = HTMLDOMParser;
+//# sourceMappingURL=html-to-dom.js.map
\ No newline at end of file
diff --git a/lib/server/utilities.d.ts b/lib/server/utilities.d.ts
index 357eaac..5872f75 100644
--- a/lib/server/utilities.d.ts
+++ b/lib/server/utilities.d.ts
@@ -1,9 +1,11 @@
-type Nodes = (Comment | Element | ProcessingInstruction | Text)[];
-
+import type { ChildNode, Comment, Element, ProcessingInstruction, Text } from 'domhandler';
+type Node = Element | Text | Comment | ProcessingInstruction;
 /**
  * Sets root parent to null.
  *
  * @param nodes - Nodes.
  * @returns - Nodes.
  */
-export function unsetRootParent(nodes: Nodes): Nodes;
+export declare function unsetRootParent(nodes: ChildNode[]): Node[];
+export {};
+//# sourceMappingURL=utilities.d.ts.map
\ No newline at end of file
diff --git a/lib/server/utilities.js b/lib/server/utilities.js
index cf8e6ea..725828e 100644
--- a/lib/server/utilities.js
+++ b/lib/server/utilities.js
@@ -1,17 +1,20 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.unsetRootParent = void 0;
 /**
  * Sets root parent to null.
  *
- * @param  {Array<Comment|Element|ProcessingInstruction|Text>} nodes
- * @return {Array<Comment|Element|ProcessingInstruction|Text>}
+ * @param nodes - Nodes.
+ * @returns - Nodes.
  */
 function unsetRootParent(nodes) {
-  for (var index = 0, len = nodes.length; index < len; index++) {
-    var node = nodes[index];
-    node.parent = null;
-  }
-  return nodes;
+    var index = 0;
+    var nodesLength = nodes.length;
+    for (; index < nodesLength; index++) {
+        var node = nodes[index];
+        node.parent = null;
+    }
+    return nodes;
 }
-
-module.exports = {
-  unsetRootParent: unsetRootParent
-};
+exports.unsetRootParent = unsetRootParent;
+//# sourceMappingURL=utilities.js.map
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index f2bda8c..349a6c0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,10 +16,11 @@
       "devDependencies": {
         "@commitlint/cli": "17.8.0",
         "@commitlint/config-conventional": "17.8.0",
-        "@definitelytyped/dtslint": "0.0.182",
+        "@rollup/plugin-alias": "5.0.1",
         "@rollup/plugin-commonjs": "25.0.7",
         "@rollup/plugin-node-resolve": "15.2.3",
         "@rollup/plugin-terser": "0.4.4",
+        "@rollup/plugin-typescript": "11.1.5",
         "@size-limit/preset-big-lib": "9.0.0",
         "@types/estree": "1.0.2",
         "@typescript-eslint/parser": "5.62.0",
@@ -711,466 +712,6 @@
         "@jridgewell/sourcemap-codec": "^1.4.10"
       }
     },
-    "node_modules/@definitelytyped/dts-critic": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/dts-critic/-/dts-critic-0.0.178.tgz",
-      "integrity": "sha512-1JiY6giD2qLYxDPSWPbZiICzmTX+cHBNMXf09SeY6CJX0kZPcAkX+Uhc64HSqlhutECRWy7SdQCp/NP3xVOt4Q==",
-      "dev": true,
-      "dependencies": {
-        "@definitelytyped/header-parser": "^0.0.178",
-        "command-exists": "^1.2.8",
-        "rimraf": "^3.0.2",
-        "semver": "^7.5.2",
-        "tmp": "^0.2.1",
-        "yargs": "^15.3.1"
-      },
-      "engines": {
-        "node": ">=10.17.0"
-      },
-      "peerDependencies": {
-        "typescript": "*"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/cliui": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
-      "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
-      "dev": true,
-      "dependencies": {
-        "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.0",
-        "wrap-ansi": "^6.2.0"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/emoji-regex": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
-      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-      "dev": true
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/find-up": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
-      "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
-      "dev": true,
-      "dependencies": {
-        "locate-path": "^5.0.0",
-        "path-exists": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/get-caller-file": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
-      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-      "dev": true,
-      "engines": {
-        "node": "6.* || 8.* || >= 10.*"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/is-fullwidth-code-point": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-      "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-      "dev": true,
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/locate-path": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
-      "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
-      "dev": true,
-      "dependencies": {
-        "p-locate": "^4.1.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/p-limit": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
-      "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
-      "dev": true,
-      "dependencies": {
-        "p-try": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/p-locate": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
-      "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
-      "dev": true,
-      "dependencies": {
-        "p-limit": "^2.2.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/string-width": {
-      "version": "4.2.3",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
-      "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-      "dev": true,
-      "dependencies": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/wrap-ansi": {
-      "version": "6.2.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
-      "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
-      "dev": true,
-      "dependencies": {
-        "ansi-styles": "^4.0.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/y18n": {
-      "version": "4.0.3",
-      "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
-      "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
-      "dev": true
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/yargs": {
-      "version": "15.4.1",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
-      "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
-      "dev": true,
-      "dependencies": {
-        "cliui": "^6.0.0",
-        "decamelize": "^1.2.0",
-        "find-up": "^4.1.0",
-        "get-caller-file": "^2.0.1",
-        "require-directory": "^2.1.1",
-        "require-main-filename": "^2.0.0",
-        "set-blocking": "^2.0.0",
-        "string-width": "^4.2.0",
-        "which-module": "^2.0.0",
-        "y18n": "^4.0.0",
-        "yargs-parser": "^18.1.2"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dts-critic/node_modules/yargs-parser": {
-      "version": "18.1.3",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
-      "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
-      "dev": true,
-      "dependencies": {
-        "camelcase": "^5.0.0",
-        "decamelize": "^1.2.0"
-      },
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint": {
-      "version": "0.0.182",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/dtslint/-/dtslint-0.0.182.tgz",
-      "integrity": "sha512-88t3yXrqXQbw+KmAY7D+PHJnC2BTzEZPxy7UvtksqrDL1RWLUxXKuG33/+0w36T3qDsdQTiqNBdLbAI+uzxsEA==",
-      "dev": true,
-      "dependencies": {
-        "@definitelytyped/dts-critic": "0.0.178",
-        "@definitelytyped/header-parser": "0.0.178",
-        "@definitelytyped/typescript-versions": "0.0.178",
-        "@definitelytyped/utils": "0.0.178",
-        "@typescript-eslint/eslint-plugin": "^5.55.0",
-        "@typescript-eslint/parser": "^5.55.0",
-        "@typescript-eslint/types": "^5.56.0",
-        "@typescript-eslint/typescript-estree": "^5.55.0",
-        "@typescript-eslint/utils": "^5.55.0",
-        "eslint": "^8.17.0",
-        "fs-extra": "^6.0.1",
-        "json-stable-stringify": "^1.0.1",
-        "strip-json-comments": "^2.0.1",
-        "tslint": "5.14.0",
-        "yargs": "^15.1.0"
-      },
-      "bin": {
-        "dtslint": "dist/index.js"
-      },
-      "engines": {
-        "node": ">=10.0.0"
-      },
-      "peerDependencies": {
-        "typescript": ">= 3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev || >= 3.8.0-dev || >= 3.9.0-dev || >= 4.0.0-dev || >=5.0.0-dev"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/cliui": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
-      "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
-      "dev": true,
-      "dependencies": {
-        "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.0",
-        "wrap-ansi": "^6.2.0"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/emoji-regex": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
-      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-      "dev": true
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/find-up": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
-      "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
-      "dev": true,
-      "dependencies": {
-        "locate-path": "^5.0.0",
-        "path-exists": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/fs-extra": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz",
-      "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==",
-      "dev": true,
-      "dependencies": {
-        "graceful-fs": "^4.1.2",
-        "jsonfile": "^4.0.0",
-        "universalify": "^0.1.0"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/get-caller-file": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
-      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-      "dev": true,
-      "engines": {
-        "node": "6.* || 8.* || >= 10.*"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/is-fullwidth-code-point": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-      "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-      "dev": true,
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/jsonfile": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
-      "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
-      "dev": true,
-      "optionalDependencies": {
-        "graceful-fs": "^4.1.6"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/locate-path": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
-      "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
-      "dev": true,
-      "dependencies": {
-        "p-locate": "^4.1.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/p-limit": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
-      "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
-      "dev": true,
-      "dependencies": {
-        "p-try": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/p-locate": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
-      "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
-      "dev": true,
-      "dependencies": {
-        "p-limit": "^2.2.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/string-width": {
-      "version": "4.2.3",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
-      "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-      "dev": true,
-      "dependencies": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/universalify": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
-      "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
-      "dev": true,
-      "engines": {
-        "node": ">= 4.0.0"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/wrap-ansi": {
-      "version": "6.2.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
-      "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
-      "dev": true,
-      "dependencies": {
-        "ansi-styles": "^4.0.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/y18n": {
-      "version": "4.0.3",
-      "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
-      "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
-      "dev": true
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/yargs": {
-      "version": "15.4.1",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
-      "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
-      "dev": true,
-      "dependencies": {
-        "cliui": "^6.0.0",
-        "decamelize": "^1.2.0",
-        "find-up": "^4.1.0",
-        "get-caller-file": "^2.0.1",
-        "require-directory": "^2.1.1",
-        "require-main-filename": "^2.0.0",
-        "set-blocking": "^2.0.0",
-        "string-width": "^4.2.0",
-        "which-module": "^2.0.0",
-        "y18n": "^4.0.0",
-        "yargs-parser": "^18.1.2"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/@definitelytyped/dtslint/node_modules/yargs-parser": {
-      "version": "18.1.3",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
-      "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
-      "dev": true,
-      "dependencies": {
-        "camelcase": "^5.0.0",
-        "decamelize": "^1.2.0"
-      },
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/@definitelytyped/header-parser": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/header-parser/-/header-parser-0.0.178.tgz",
-      "integrity": "sha512-16FFuaWW2Hq+a0Abyt+9gvPAT0w/ezy4eph3RbtLSqxH3T/UHDla1jgnp1DMvfNeBWaIqHxcr+Vrr7BPquw7mw==",
-      "dev": true,
-      "dependencies": {
-        "@definitelytyped/typescript-versions": "^0.0.178",
-        "@types/parsimmon": "^1.10.1",
-        "parsimmon": "^1.13.0"
-      }
-    },
-    "node_modules/@definitelytyped/typescript-versions": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/typescript-versions/-/typescript-versions-0.0.178.tgz",
-      "integrity": "sha512-pPXy3z5gE4xnVgqIRApFcQ6M6kqtRK1gnqyGx/I0Yo1CH8RAsRvumCDB/KiZmQDpCHiy//E9dOIUFdquvC5t7g==",
-      "dev": true
-    },
-    "node_modules/@definitelytyped/utils": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/utils/-/utils-0.0.178.tgz",
-      "integrity": "sha512-nYg3E51XpTodS0/5w5r1wM/DhPYhyqa9BP8ili4XgB5s9j4v4mDPX9Jwjns2q24derBvyhdUpzshKDh43aqwZw==",
-      "dev": true,
-      "dependencies": {
-        "@definitelytyped/typescript-versions": "^0.0.178",
-        "@qiwi/npm-registry-client": "^8.9.1",
-        "@types/node": "^14.14.35",
-        "charm": "^1.0.2",
-        "fs-extra": "^8.1.0",
-        "fstream": "^1.0.12",
-        "tar": "^6.1.11",
-        "tar-stream": "^2.1.4"
-      }
-    },
-    "node_modules/@definitelytyped/utils/node_modules/@types/node": {
-      "version": "14.18.48",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/@definitelytyped/utils/node_modules/fs-extra": {
-      "version": "8.1.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "graceful-fs": "^4.2.0",
-        "jsonfile": "^4.0.0",
-        "universalify": "^0.1.0"
-      },
-      "engines": {
-        "node": ">=6 <7 || >=8"
-      }
-    },
-    "node_modules/@definitelytyped/utils/node_modules/jsonfile": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
-      "optionalDependencies": {
-        "graceful-fs": "^4.1.6"
-      }
-    },
-    "node_modules/@definitelytyped/utils/node_modules/universalify": {
-      "version": "0.1.2",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 4.0.0"
-      }
-    },
     "node_modules/@eslint-community/eslint-utils": {
       "version": "4.4.0",
       "dev": true,
@@ -1492,25 +1033,36 @@
         "url": "https://opencollective.com/unts"
       }
     },
-    "node_modules/@qiwi/npm-registry-client": {
-      "version": "8.9.1",
+    "node_modules/@rollup/plugin-alias": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.0.1.tgz",
+      "integrity": "sha512-JObvbWdOHoMy9W7SU0lvGhDtWq9PllP5mjpAy+TUslZG/WzOId9u80Hsqq1vCUn9pFJ0cxpdcnAv+QzU2zFH3Q==",
+      "dev": true,
+      "dependencies": {
+        "slash": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      },
+      "peerDependencies": {
+        "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+      },
+      "peerDependenciesMeta": {
+        "rollup": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@rollup/plugin-alias/node_modules/slash": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
+      "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
       "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "concat-stream": "^2.0.0",
-        "graceful-fs": "^4.2.4",
-        "normalize-package-data": "~1.0.1 || ^2.0.0 || ^3.0.0",
-        "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^8.0.0",
-        "once": "^1.4.0",
-        "request": "^2.88.2",
-        "retry": "^0.12.0",
-        "safe-buffer": "^5.2.1",
-        "semver": "2 >=2.2.1 || 3.x || 4 || 5 || 7",
-        "slide": "^1.1.6",
-        "ssri": "^8.0.0"
+      "engines": {
+        "node": ">=12"
       },
-      "optionalDependencies": {
-        "npmlog": "2 || ^3.1.0 || ^4.0.0"
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
     "node_modules/@rollup/plugin-commonjs": {
@@ -1594,6 +1146,32 @@
         "randombytes": "^2.1.0"
       }
     },
+    "node_modules/@rollup/plugin-typescript": {
+      "version": "11.1.5",
+      "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz",
+      "integrity": "sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA==",
+      "dev": true,
+      "dependencies": {
+        "@rollup/pluginutils": "^5.0.1",
+        "resolve": "^1.22.1"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      },
+      "peerDependencies": {
+        "rollup": "^2.14.0||^3.0.0||^4.0.0",
+        "tslib": "*",
+        "typescript": ">=3.7.0"
+      },
+      "peerDependenciesMeta": {
+        "rollup": {
+          "optional": true
+        },
+        "tslib": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/@rollup/pluginutils": {
       "version": "5.0.5",
       "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz",
@@ -1975,22 +1553,11 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/@types/parsimmon": {
-      "version": "1.10.6",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/@types/resolve": {
       "version": "1.20.2",
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/@types/semver": {
-      "version": "7.5.3",
-      "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
-      "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",
-      "dev": true
-    },
     "node_modules/@types/yauzl": {
       "version": "2.10.0",
       "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
@@ -2001,61 +1568,6 @@
         "@types/node": "*"
       }
     },
-    "node_modules/@typescript-eslint/eslint-plugin": {
-      "version": "5.62.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
-      "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
-      "dev": true,
-      "dependencies": {
-        "@eslint-community/regexpp": "^4.4.0",
-        "@typescript-eslint/scope-manager": "5.62.0",
-        "@typescript-eslint/type-utils": "5.62.0",
-        "@typescript-eslint/utils": "5.62.0",
-        "debug": "^4.3.4",
-        "graphemer": "^1.4.0",
-        "ignore": "^5.2.0",
-        "natural-compare-lite": "^1.4.0",
-        "semver": "^7.3.7",
-        "tsutils": "^3.21.0"
-      },
-      "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependencies": {
-        "@typescript-eslint/parser": "^5.0.0",
-        "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
-      },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@typescript-eslint/eslint-plugin/node_modules/tslib": {
-      "version": "1.14.1",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
-      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
-      "dev": true
-    },
-    "node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils": {
-      "version": "3.21.0",
-      "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
-      "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
-      "dev": true,
-      "dependencies": {
-        "tslib": "^1.8.1"
-      },
-      "engines": {
-        "node": ">= 6"
-      },
-      "peerDependencies": {
-        "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
-      }
-    },
     "node_modules/@typescript-eslint/parser": {
       "version": "5.62.0",
       "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
@@ -2100,54 +1612,6 @@
         "url": "https://opencollective.com/typescript-eslint"
       }
     },
-    "node_modules/@typescript-eslint/type-utils": {
-      "version": "5.62.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz",
-      "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==",
-      "dev": true,
-      "dependencies": {
-        "@typescript-eslint/typescript-estree": "5.62.0",
-        "@typescript-eslint/utils": "5.62.0",
-        "debug": "^4.3.4",
-        "tsutils": "^3.21.0"
-      },
-      "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependencies": {
-        "eslint": "*"
-      },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@typescript-eslint/type-utils/node_modules/tslib": {
-      "version": "1.14.1",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
-      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
-      "dev": true
-    },
-    "node_modules/@typescript-eslint/type-utils/node_modules/tsutils": {
-      "version": "3.21.0",
-      "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
-      "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
-      "dev": true,
-      "dependencies": {
-        "tslib": "^1.8.1"
-      },
-      "engines": {
-        "node": ">= 6"
-      },
-      "peerDependencies": {
-        "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
-      }
-    },
     "node_modules/@typescript-eslint/types": {
       "version": "5.62.0",
       "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
@@ -2209,54 +1673,6 @@
         "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
       }
     },
-    "node_modules/@typescript-eslint/utils": {
-      "version": "5.62.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
-      "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
-      "dev": true,
-      "dependencies": {
-        "@eslint-community/eslint-utils": "^4.2.0",
-        "@types/json-schema": "^7.0.9",
-        "@types/semver": "^7.3.12",
-        "@typescript-eslint/scope-manager": "5.62.0",
-        "@typescript-eslint/types": "5.62.0",
-        "@typescript-eslint/typescript-estree": "5.62.0",
-        "eslint-scope": "^5.1.1",
-        "semver": "^7.3.7"
-      },
-      "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependencies": {
-        "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
-      }
-    },
-    "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
-      "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
-      "dev": true,
-      "dependencies": {
-        "esrecurse": "^4.3.0",
-        "estraverse": "^4.1.1"
-      },
-      "engines": {
-        "node": ">=8.0.0"
-      }
-    },
-    "node_modules/@typescript-eslint/utils/node_modules/estraverse": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
-      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
-      "dev": true,
-      "engines": {
-        "node": ">=4.0"
-      }
-    },
     "node_modules/@typescript-eslint/visitor-keys": {
       "version": "5.62.0",
       "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
@@ -2627,63 +2043,11 @@
         "node": ">=8"
       }
     },
-    "node_modules/aproba": {
-      "version": "1.2.0",
-      "dev": true,
-      "license": "ISC",
-      "optional": true
-    },
     "node_modules/archy": {
       "version": "1.0.0",
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/are-we-there-yet": {
-      "version": "1.1.7",
-      "dev": true,
-      "license": "ISC",
-      "optional": true,
-      "dependencies": {
-        "delegates": "^1.0.0",
-        "readable-stream": "^2.0.6"
-      }
-    },
-    "node_modules/are-we-there-yet/node_modules/isarray": {
-      "version": "1.0.0",
-      "dev": true,
-      "license": "MIT",
-      "optional": true
-    },
-    "node_modules/are-we-there-yet/node_modules/readable-stream": {
-      "version": "2.3.8",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "dependencies": {
-        "core-util-is": "~1.0.0",
-        "inherits": "~2.0.3",
-        "isarray": "~1.0.0",
-        "process-nextick-args": "~2.0.0",
-        "safe-buffer": "~5.1.1",
-        "string_decoder": "~1.1.1",
-        "util-deprecate": "~1.0.1"
-      }
-    },
-    "node_modules/are-we-there-yet/node_modules/safe-buffer": {
-      "version": "5.1.2",
-      "dev": true,
-      "license": "MIT",
-      "optional": true
-    },
-    "node_modules/are-we-there-yet/node_modules/string_decoder": {
-      "version": "1.1.1",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "dependencies": {
-        "safe-buffer": "~5.1.0"
-      }
-    },
     "node_modules/arg": {
       "version": "4.1.3",
       "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
@@ -2746,119 +2110,46 @@
       "dev": true,
       "license": "MIT",
       "engines": {
-        "node": ">=0.8"
-      }
-    },
-    "node_modules/assertion-error": {
-      "version": "1.1.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": "*"
-      }
-    },
-    "node_modules/asynckit": {
-      "version": "0.4.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/available-typed-arrays": {
-      "version": "1.0.5",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/aws-sign2": {
-      "version": "0.7.0",
-      "dev": true,
-      "license": "Apache-2.0",
-      "engines": {
-        "node": "*"
-      }
-    },
-    "node_modules/aws4": {
-      "version": "1.12.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/babel-code-frame": {
-      "version": "6.26.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "chalk": "^1.1.3",
-        "esutils": "^2.0.2",
-        "js-tokens": "^3.0.2"
-      }
-    },
-    "node_modules/babel-code-frame/node_modules/ansi-regex": {
-      "version": "2.1.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/babel-code-frame/node_modules/ansi-styles": {
-      "version": "2.2.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/babel-code-frame/node_modules/chalk": {
-      "version": "1.1.3",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^2.2.1",
-        "escape-string-regexp": "^1.0.2",
-        "has-ansi": "^2.0.0",
-        "strip-ansi": "^3.0.0",
-        "supports-color": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
+        "node": ">=0.8"
       }
     },
-    "node_modules/babel-code-frame/node_modules/escape-string-regexp": {
-      "version": "1.0.5",
+    "node_modules/assertion-error": {
+      "version": "1.1.0",
       "dev": true,
       "license": "MIT",
       "engines": {
-        "node": ">=0.8.0"
+        "node": "*"
       }
     },
-    "node_modules/babel-code-frame/node_modules/js-tokens": {
-      "version": "3.0.2",
+    "node_modules/asynckit": {
+      "version": "0.4.0",
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/babel-code-frame/node_modules/strip-ansi": {
-      "version": "3.0.1",
+    "node_modules/available-typed-arrays": {
+      "version": "1.0.5",
       "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^2.0.0"
-      },
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/babel-code-frame/node_modules/supports-color": {
-      "version": "2.0.0",
+    "node_modules/aws-sign2": {
+      "version": "0.7.0",
       "dev": true,
-      "license": "MIT",
+      "license": "Apache-2.0",
       "engines": {
-        "node": ">=0.8.0"
+        "node": "*"
       }
     },
+    "node_modules/aws4": {
+      "version": "1.12.0",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/balanced-match": {
       "version": "1.0.2",
       "dev": true,
@@ -3078,11 +2369,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/builtins": {
-      "version": "1.0.3",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/bundle-name": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
@@ -3238,14 +2524,6 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/charm": {
-      "version": "1.0.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "inherits": "^2.0.1"
-      }
-    },
     "node_modules/check-error": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
@@ -3295,14 +2573,6 @@
         "node": ">= 6"
       }
     },
-    "node_modules/chownr": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": ">=10"
-      }
-    },
     "node_modules/chrome-trace-event": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
@@ -3401,15 +2671,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/code-point-at": {
-      "version": "1.1.0",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
     "node_modules/color-convert": {
       "version": "2.0.1",
       "dev": true,
@@ -3443,11 +2704,6 @@
         "node": ">= 0.8"
       }
     },
-    "node_modules/command-exists": {
-      "version": "1.2.9",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/commander": {
       "version": "9.5.0",
       "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
@@ -3476,20 +2732,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/concat-stream": {
-      "version": "2.0.0",
-      "dev": true,
-      "engines": [
-        "node >= 6.0"
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "buffer-from": "^1.0.0",
-        "inherits": "^2.0.3",
-        "readable-stream": "^3.0.2",
-        "typedarray": "^0.0.6"
-      }
-    },
     "node_modules/connect": {
       "version": "3.7.0",
       "dev": true,
@@ -3517,12 +2759,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/console-control-strings": {
-      "version": "1.1.0",
-      "dev": true,
-      "license": "ISC",
-      "optional": true
-    },
     "node_modules/content-type": {
       "version": "1.0.5",
       "dev": true,
@@ -3981,12 +3217,6 @@
         "node": ">=0.4.0"
       }
     },
-    "node_modules/delegates": {
-      "version": "1.0.0",
-      "dev": true,
-      "license": "MIT",
-      "optional": true
-    },
     "node_modules/depd": {
       "version": "2.0.0",
       "dev": true,
@@ -5027,17 +4257,6 @@
         "node": ">=14.14"
       }
     },
-    "node_modules/fs-minipass": {
-      "version": "2.1.0",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "minipass": "^3.0.0"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
     "node_modules/fs.realpath": {
       "version": "1.0.0",
       "dev": true,
@@ -5055,50 +4274,6 @@
         "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
       }
     },
-    "node_modules/fstream": {
-      "version": "1.0.12",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "graceful-fs": "^4.1.2",
-        "inherits": "~2.0.0",
-        "mkdirp": ">=0.5 0",
-        "rimraf": "2"
-      },
-      "engines": {
-        "node": ">=0.6"
-      }
-    },
-    "node_modules/fstream/node_modules/glob": {
-      "version": "7.2.3",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "fs.realpath": "^1.0.0",
-        "inflight": "^1.0.4",
-        "inherits": "2",
-        "minimatch": "^3.1.1",
-        "once": "^1.3.0",
-        "path-is-absolute": "^1.0.0"
-      },
-      "engines": {
-        "node": "*"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
-    "node_modules/fstream/node_modules/rimraf": {
-      "version": "2.7.1",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "glob": "^7.1.3"
-      },
-      "bin": {
-        "rimraf": "bin.js"
-      }
-    },
     "node_modules/function-bind": {
       "version": "1.1.1",
       "dev": true,
@@ -5129,69 +4304,6 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/gauge": {
-      "version": "2.7.4",
-      "dev": true,
-      "license": "ISC",
-      "optional": true,
-      "dependencies": {
-        "aproba": "^1.0.3",
-        "console-control-strings": "^1.0.0",
-        "has-unicode": "^2.0.0",
-        "object-assign": "^4.1.0",
-        "signal-exit": "^3.0.0",
-        "string-width": "^1.0.1",
-        "strip-ansi": "^3.0.1",
-        "wide-align": "^1.1.0"
-      }
-    },
-    "node_modules/gauge/node_modules/ansi-regex": {
-      "version": "2.1.1",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/gauge/node_modules/is-fullwidth-code-point": {
-      "version": "1.0.0",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "dependencies": {
-        "number-is-nan": "^1.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/gauge/node_modules/string-width": {
-      "version": "1.0.2",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "dependencies": {
-        "code-point-at": "^1.0.0",
-        "is-fullwidth-code-point": "^1.0.0",
-        "strip-ansi": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/gauge/node_modules/strip-ansi": {
-      "version": "3.0.1",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "dependencies": {
-        "ansi-regex": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
     "node_modules/gensync": {
       "version": "1.0.0-beta.2",
       "dev": true,
@@ -5482,25 +4594,6 @@
         "node": ">= 0.4.0"
       }
     },
-    "node_modules/has-ansi": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/has-ansi/node_modules/ansi-regex": {
-      "version": "2.1.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
     "node_modules/has-bigints": {
       "version": "1.0.2",
       "dev": true,
@@ -5564,12 +4657,6 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/has-unicode": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "ISC",
-      "optional": true
-    },
     "node_modules/hasha": {
       "version": "5.2.2",
       "dev": true,
@@ -6480,17 +5567,6 @@
       "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
       "dev": true
     },
-    "node_modules/json-stable-stringify": {
-      "version": "1.0.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "jsonify": "^0.0.1"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/json-stable-stringify-without-jsonify": {
       "version": "1.0.1",
       "dev": true,
@@ -6523,14 +5599,6 @@
         "graceful-fs": "^4.1.6"
       }
     },
-    "node_modules/jsonify": {
-      "version": "0.0.1",
-      "dev": true,
-      "license": "Public Domain",
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/jsonparse": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
@@ -7634,29 +6702,6 @@
         "node": ">= 6"
       }
     },
-    "node_modules/minipass": {
-      "version": "3.3.6",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "yallist": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/minizlib": {
-      "version": "2.1.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "minipass": "^3.0.0",
-        "yallist": "^4.0.0"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
     "node_modules/mkdirp": {
       "version": "0.5.6",
       "dev": true,
@@ -7946,12 +6991,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/natural-compare-lite": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
-      "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
-      "dev": true
-    },
     "node_modules/negotiator": {
       "version": "0.6.3",
       "dev": true,
@@ -8067,19 +7106,6 @@
         "node": ">=0.10.0"
       }
     },
-    "node_modules/npm-package-arg": {
-      "version": "8.1.5",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "hosted-git-info": "^4.0.1",
-        "semver": "^7.3.4",
-        "validate-npm-package-name": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
     "node_modules/npm-run-all": {
       "version": "4.1.5",
       "dev": true,
@@ -8245,32 +7271,11 @@
       "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
       "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
       "dev": true,
-      "dependencies": {
-        "path-key": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/npmlog": {
-      "version": "4.1.2",
-      "dev": true,
-      "license": "ISC",
-      "optional": true,
-      "dependencies": {
-        "are-we-there-yet": "~1.1.2",
-        "console-control-strings": "~1.1.0",
-        "gauge": "~2.7.3",
-        "set-blocking": "~2.0.0"
-      }
-    },
-    "node_modules/number-is-nan": {
-      "version": "1.0.1",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
+      "dependencies": {
+        "path-key": "^3.0.0"
+      },
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">=8"
       }
     },
     "node_modules/nwmatcher": {
@@ -8706,11 +7711,6 @@
         "node": ">= 0.8"
       }
     },
-    "node_modules/parsimmon": {
-      "version": "1.18.1",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/path-exists": {
       "version": "4.0.0",
       "dev": true,
@@ -8915,12 +7915,6 @@
         "node": ">=6.0.0"
       }
     },
-    "node_modules/process-nextick-args": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
-      "optional": true
-    },
     "node_modules/process-on-spawn": {
       "version": "1.0.0",
       "dev": true,
@@ -9439,14 +8433,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/retry": {
-      "version": "0.12.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 4"
-      }
-    },
     "node_modules/reusify": {
       "version": "1.0.4",
       "dev": true,
@@ -9810,14 +8796,6 @@
         "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/slide": {
-      "version": "1.1.6",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": "*"
-      }
-    },
     "node_modules/smob": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz",
@@ -9978,17 +8956,6 @@
         "node": ">=0.10.0"
       }
     },
-    "node_modules/ssri": {
-      "version": "8.0.1",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "minipass": "^3.1.1"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
     "node_modules/statuses": {
       "version": "1.5.0",
       "dev": true,
@@ -10196,14 +9163,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/strip-json-comments": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
     "node_modules/supports-color": {
       "version": "7.2.0",
       "dev": true,
@@ -10256,22 +9215,6 @@
         "node": ">=6"
       }
     },
-    "node_modules/tar": {
-      "version": "6.1.15",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "chownr": "^2.0.0",
-        "fs-minipass": "^2.0.0",
-        "minipass": "^5.0.0",
-        "minizlib": "^2.1.1",
-        "mkdirp": "^1.0.3",
-        "yallist": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
     "node_modules/tar-fs": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
@@ -10305,25 +9248,6 @@
         "node": ">=6"
       }
     },
-    "node_modules/tar/node_modules/minipass": {
-      "version": "5.0.0",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/tar/node_modules/mkdirp": {
-      "version": "1.0.4",
-      "dev": true,
-      "license": "MIT",
-      "bin": {
-        "mkdirp": "bin/cmd.js"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
     "node_modules/terser": {
       "version": "5.17.6",
       "dev": true,
@@ -10610,188 +9534,6 @@
       "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==",
       "dev": true
     },
-    "node_modules/tslint": {
-      "version": "5.14.0",
-      "dev": true,
-      "license": "Apache-2.0",
-      "dependencies": {
-        "babel-code-frame": "^6.22.0",
-        "builtin-modules": "^1.1.1",
-        "chalk": "^2.3.0",
-        "commander": "^2.12.1",
-        "diff": "^3.2.0",
-        "glob": "^7.1.1",
-        "js-yaml": "^3.7.0",
-        "minimatch": "^3.0.4",
-        "mkdirp": "^0.5.1",
-        "resolve": "^1.3.2",
-        "semver": "^5.3.0",
-        "tslib": "^1.8.0",
-        "tsutils": "^2.29.0"
-      },
-      "bin": {
-        "tslint": "bin/tslint"
-      },
-      "engines": {
-        "node": ">=4.8.0"
-      },
-      "peerDependencies": {
-        "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev"
-      }
-    },
-    "node_modules/tslint/node_modules/ansi-styles": {
-      "version": "3.2.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^1.9.0"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/tslint/node_modules/argparse": {
-      "version": "1.0.10",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "sprintf-js": "~1.0.2"
-      }
-    },
-    "node_modules/tslint/node_modules/builtin-modules": {
-      "version": "1.1.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/tslint/node_modules/chalk": {
-      "version": "2.4.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^3.2.1",
-        "escape-string-regexp": "^1.0.5",
-        "supports-color": "^5.3.0"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/tslint/node_modules/color-convert": {
-      "version": "1.9.3",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-name": "1.1.3"
-      }
-    },
-    "node_modules/tslint/node_modules/color-name": {
-      "version": "1.1.3",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/tslint/node_modules/commander": {
-      "version": "2.20.3",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/tslint/node_modules/diff": {
-      "version": "3.5.0",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "engines": {
-        "node": ">=0.3.1"
-      }
-    },
-    "node_modules/tslint/node_modules/escape-string-regexp": {
-      "version": "1.0.5",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.8.0"
-      }
-    },
-    "node_modules/tslint/node_modules/glob": {
-      "version": "7.2.3",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "fs.realpath": "^1.0.0",
-        "inflight": "^1.0.4",
-        "inherits": "2",
-        "minimatch": "^3.1.1",
-        "once": "^1.3.0",
-        "path-is-absolute": "^1.0.0"
-      },
-      "engines": {
-        "node": "*"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
-    "node_modules/tslint/node_modules/has-flag": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/tslint/node_modules/js-yaml": {
-      "version": "3.14.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "argparse": "^1.0.7",
-        "esprima": "^4.0.0"
-      },
-      "bin": {
-        "js-yaml": "bin/js-yaml.js"
-      }
-    },
-    "node_modules/tslint/node_modules/semver": {
-      "version": "5.7.1",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver"
-      }
-    },
-    "node_modules/tslint/node_modules/supports-color": {
-      "version": "5.5.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "has-flag": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/tslint/node_modules/tslib": {
-      "version": "1.14.1",
-      "dev": true,
-      "license": "0BSD"
-    },
-    "node_modules/tsutils": {
-      "version": "2.29.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "tslib": "^1.8.1"
-      },
-      "peerDependencies": {
-        "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev"
-      }
-    },
-    "node_modules/tsutils/node_modules/tslib": {
-      "version": "1.14.1",
-      "dev": true,
-      "license": "0BSD"
-    },
     "node_modules/tunnel-agent": {
       "version": "0.6.0",
       "dev": true,
@@ -10865,11 +9607,6 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/typedarray": {
-      "version": "0.0.6",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/typedarray-to-buffer": {
       "version": "3.1.5",
       "dev": true,
@@ -11047,14 +9784,6 @@
         "spdx-expression-parse": "^3.0.0"
       }
     },
-    "node_modules/validate-npm-package-name": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "builtins": "^1.0.3"
-      }
-    },
     "node_modules/vary": {
       "version": "1.1.2",
       "dev": true,
@@ -11238,46 +9967,8 @@
       "engines": {
         "node": ">= 0.4"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/wide-align": {
-      "version": "1.1.5",
-      "dev": true,
-      "license": "ISC",
-      "optional": true,
-      "dependencies": {
-        "string-width": "^1.0.2 || 2 || 3 || 4"
-      }
-    },
-    "node_modules/wide-align/node_modules/emoji-regex": {
-      "version": "8.0.0",
-      "dev": true,
-      "license": "MIT",
-      "optional": true
-    },
-    "node_modules/wide-align/node_modules/is-fullwidth-code-point": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/wide-align/node_modules/string-width": {
-      "version": "4.2.3",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "dependencies": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=8"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/word-wrap": {
@@ -11992,396 +10683,24 @@
         "chalk": "^4.1.0"
       }
     },
-    "@cspotcode/source-map-support": {
-      "version": "0.8.1",
-      "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
-      "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
-      "dev": true,
-      "requires": {
-        "@jridgewell/trace-mapping": "0.3.9"
-      },
-      "dependencies": {
-        "@jridgewell/trace-mapping": {
-          "version": "0.3.9",
-          "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
-          "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
-          "dev": true,
-          "requires": {
-            "@jridgewell/resolve-uri": "^3.0.3",
-            "@jridgewell/sourcemap-codec": "^1.4.10"
-          }
-        }
-      }
-    },
-    "@definitelytyped/dts-critic": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/dts-critic/-/dts-critic-0.0.178.tgz",
-      "integrity": "sha512-1JiY6giD2qLYxDPSWPbZiICzmTX+cHBNMXf09SeY6CJX0kZPcAkX+Uhc64HSqlhutECRWy7SdQCp/NP3xVOt4Q==",
-      "dev": true,
-      "requires": {
-        "@definitelytyped/header-parser": "^0.0.178",
-        "command-exists": "^1.2.8",
-        "rimraf": "^3.0.2",
-        "semver": "^7.5.2",
-        "tmp": "^0.2.1",
-        "yargs": "^15.3.1"
-      },
-      "dependencies": {
-        "cliui": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
-          "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
-          "dev": true,
-          "requires": {
-            "string-width": "^4.2.0",
-            "strip-ansi": "^6.0.0",
-            "wrap-ansi": "^6.2.0"
-          }
-        },
-        "emoji-regex": {
-          "version": "8.0.0",
-          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
-          "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-          "dev": true
-        },
-        "find-up": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
-          "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
-          "dev": true,
-          "requires": {
-            "locate-path": "^5.0.0",
-            "path-exists": "^4.0.0"
-          }
-        },
-        "get-caller-file": {
-          "version": "2.0.5",
-          "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
-          "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-          "dev": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-          "dev": true
-        },
-        "locate-path": {
-          "version": "5.0.0",
-          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
-          "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
-          "dev": true,
-          "requires": {
-            "p-locate": "^4.1.0"
-          }
-        },
-        "p-limit": {
-          "version": "2.3.0",
-          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
-          "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
-          "dev": true,
-          "requires": {
-            "p-try": "^2.0.0"
-          }
-        },
-        "p-locate": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
-          "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
-          "dev": true,
-          "requires": {
-            "p-limit": "^2.2.0"
-          }
-        },
-        "string-width": {
-          "version": "4.2.3",
-          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
-          "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-          "dev": true,
-          "requires": {
-            "emoji-regex": "^8.0.0",
-            "is-fullwidth-code-point": "^3.0.0",
-            "strip-ansi": "^6.0.1"
-          }
-        },
-        "wrap-ansi": {
-          "version": "6.2.0",
-          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
-          "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.0.0",
-            "string-width": "^4.1.0",
-            "strip-ansi": "^6.0.0"
-          }
-        },
-        "y18n": {
-          "version": "4.0.3",
-          "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
-          "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
-          "dev": true
-        },
-        "yargs": {
-          "version": "15.4.1",
-          "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
-          "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
-          "dev": true,
-          "requires": {
-            "cliui": "^6.0.0",
-            "decamelize": "^1.2.0",
-            "find-up": "^4.1.0",
-            "get-caller-file": "^2.0.1",
-            "require-directory": "^2.1.1",
-            "require-main-filename": "^2.0.0",
-            "set-blocking": "^2.0.0",
-            "string-width": "^4.2.0",
-            "which-module": "^2.0.0",
-            "y18n": "^4.0.0",
-            "yargs-parser": "^18.1.2"
-          }
-        },
-        "yargs-parser": {
-          "version": "18.1.3",
-          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
-          "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
-          "dev": true,
-          "requires": {
-            "camelcase": "^5.0.0",
-            "decamelize": "^1.2.0"
-          }
-        }
-      }
-    },
-    "@definitelytyped/dtslint": {
-      "version": "0.0.182",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/dtslint/-/dtslint-0.0.182.tgz",
-      "integrity": "sha512-88t3yXrqXQbw+KmAY7D+PHJnC2BTzEZPxy7UvtksqrDL1RWLUxXKuG33/+0w36T3qDsdQTiqNBdLbAI+uzxsEA==",
-      "dev": true,
-      "requires": {
-        "@definitelytyped/dts-critic": "0.0.178",
-        "@definitelytyped/header-parser": "0.0.178",
-        "@definitelytyped/typescript-versions": "0.0.178",
-        "@definitelytyped/utils": "0.0.178",
-        "@typescript-eslint/eslint-plugin": "^5.55.0",
-        "@typescript-eslint/parser": "^5.55.0",
-        "@typescript-eslint/types": "^5.56.0",
-        "@typescript-eslint/typescript-estree": "^5.55.0",
-        "@typescript-eslint/utils": "^5.55.0",
-        "eslint": "^8.17.0",
-        "fs-extra": "^6.0.1",
-        "json-stable-stringify": "^1.0.1",
-        "strip-json-comments": "^2.0.1",
-        "tslint": "5.14.0",
-        "yargs": "^15.1.0"
-      },
-      "dependencies": {
-        "cliui": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
-          "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
-          "dev": true,
-          "requires": {
-            "string-width": "^4.2.0",
-            "strip-ansi": "^6.0.0",
-            "wrap-ansi": "^6.2.0"
-          }
-        },
-        "emoji-regex": {
-          "version": "8.0.0",
-          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
-          "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-          "dev": true
-        },
-        "find-up": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
-          "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
-          "dev": true,
-          "requires": {
-            "locate-path": "^5.0.0",
-            "path-exists": "^4.0.0"
-          }
-        },
-        "fs-extra": {
-          "version": "6.0.1",
-          "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz",
-          "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==",
-          "dev": true,
-          "requires": {
-            "graceful-fs": "^4.1.2",
-            "jsonfile": "^4.0.0",
-            "universalify": "^0.1.0"
-          }
-        },
-        "get-caller-file": {
-          "version": "2.0.5",
-          "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
-          "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-          "dev": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-          "dev": true
-        },
-        "jsonfile": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
-          "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
-          "dev": true,
-          "requires": {
-            "graceful-fs": "^4.1.6"
-          }
-        },
-        "locate-path": {
-          "version": "5.0.0",
-          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
-          "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
-          "dev": true,
-          "requires": {
-            "p-locate": "^4.1.0"
-          }
-        },
-        "p-limit": {
-          "version": "2.3.0",
-          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
-          "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
-          "dev": true,
-          "requires": {
-            "p-try": "^2.0.0"
-          }
-        },
-        "p-locate": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
-          "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
-          "dev": true,
-          "requires": {
-            "p-limit": "^2.2.0"
-          }
-        },
-        "string-width": {
-          "version": "4.2.3",
-          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
-          "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-          "dev": true,
-          "requires": {
-            "emoji-regex": "^8.0.0",
-            "is-fullwidth-code-point": "^3.0.0",
-            "strip-ansi": "^6.0.1"
-          }
-        },
-        "universalify": {
-          "version": "0.1.2",
-          "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
-          "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
-          "dev": true
-        },
-        "wrap-ansi": {
-          "version": "6.2.0",
-          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
-          "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.0.0",
-            "string-width": "^4.1.0",
-            "strip-ansi": "^6.0.0"
-          }
-        },
-        "y18n": {
-          "version": "4.0.3",
-          "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
-          "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
-          "dev": true
-        },
-        "yargs": {
-          "version": "15.4.1",
-          "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
-          "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
-          "dev": true,
-          "requires": {
-            "cliui": "^6.0.0",
-            "decamelize": "^1.2.0",
-            "find-up": "^4.1.0",
-            "get-caller-file": "^2.0.1",
-            "require-directory": "^2.1.1",
-            "require-main-filename": "^2.0.0",
-            "set-blocking": "^2.0.0",
-            "string-width": "^4.2.0",
-            "which-module": "^2.0.0",
-            "y18n": "^4.0.0",
-            "yargs-parser": "^18.1.2"
-          }
-        },
-        "yargs-parser": {
-          "version": "18.1.3",
-          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
-          "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
-          "dev": true,
-          "requires": {
-            "camelcase": "^5.0.0",
-            "decamelize": "^1.2.0"
-          }
-        }
-      }
-    },
-    "@definitelytyped/header-parser": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/header-parser/-/header-parser-0.0.178.tgz",
-      "integrity": "sha512-16FFuaWW2Hq+a0Abyt+9gvPAT0w/ezy4eph3RbtLSqxH3T/UHDla1jgnp1DMvfNeBWaIqHxcr+Vrr7BPquw7mw==",
-      "dev": true,
-      "requires": {
-        "@definitelytyped/typescript-versions": "^0.0.178",
-        "@types/parsimmon": "^1.10.1",
-        "parsimmon": "^1.13.0"
-      }
-    },
-    "@definitelytyped/typescript-versions": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/typescript-versions/-/typescript-versions-0.0.178.tgz",
-      "integrity": "sha512-pPXy3z5gE4xnVgqIRApFcQ6M6kqtRK1gnqyGx/I0Yo1CH8RAsRvumCDB/KiZmQDpCHiy//E9dOIUFdquvC5t7g==",
-      "dev": true
-    },
-    "@definitelytyped/utils": {
-      "version": "0.0.178",
-      "resolved": "https://registry.npmjs.org/@definitelytyped/utils/-/utils-0.0.178.tgz",
-      "integrity": "sha512-nYg3E51XpTodS0/5w5r1wM/DhPYhyqa9BP8ili4XgB5s9j4v4mDPX9Jwjns2q24derBvyhdUpzshKDh43aqwZw==",
+    "@cspotcode/source-map-support": {
+      "version": "0.8.1",
+      "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+      "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
       "dev": true,
       "requires": {
-        "@definitelytyped/typescript-versions": "^0.0.178",
-        "@qiwi/npm-registry-client": "^8.9.1",
-        "@types/node": "^14.14.35",
-        "charm": "^1.0.2",
-        "fs-extra": "^8.1.0",
-        "fstream": "^1.0.12",
-        "tar": "^6.1.11",
-        "tar-stream": "^2.1.4"
+        "@jridgewell/trace-mapping": "0.3.9"
       },
       "dependencies": {
-        "@types/node": {
-          "version": "14.18.48",
-          "dev": true
-        },
-        "fs-extra": {
-          "version": "8.1.0",
-          "dev": true,
-          "requires": {
-            "graceful-fs": "^4.2.0",
-            "jsonfile": "^4.0.0",
-            "universalify": "^0.1.0"
-          }
-        },
-        "jsonfile": {
-          "version": "4.0.0",
+        "@jridgewell/trace-mapping": {
+          "version": "0.3.9",
+          "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+          "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
           "dev": true,
           "requires": {
-            "graceful-fs": "^4.1.6"
+            "@jridgewell/resolve-uri": "^3.0.3",
+            "@jridgewell/sourcemap-codec": "^1.4.10"
           }
-        },
-        "universalify": {
-          "version": "0.1.2",
-          "dev": true
         }
       }
     },
@@ -12606,22 +10925,21 @@
         "tslib": "^2.6.0"
       }
     },
-    "@qiwi/npm-registry-client": {
-      "version": "8.9.1",
+    "@rollup/plugin-alias": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.0.1.tgz",
+      "integrity": "sha512-JObvbWdOHoMy9W7SU0lvGhDtWq9PllP5mjpAy+TUslZG/WzOId9u80Hsqq1vCUn9pFJ0cxpdcnAv+QzU2zFH3Q==",
       "dev": true,
       "requires": {
-        "concat-stream": "^2.0.0",
-        "graceful-fs": "^4.2.4",
-        "normalize-package-data": "~1.0.1 || ^2.0.0 || ^3.0.0",
-        "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^8.0.0",
-        "npmlog": "2 || ^3.1.0 || ^4.0.0",
-        "once": "^1.4.0",
-        "request": "^2.88.2",
-        "retry": "^0.12.0",
-        "safe-buffer": "^5.2.1",
-        "semver": "2 >=2.2.1 || 3.x || 4 || 5 || 7",
-        "slide": "^1.1.6",
-        "ssri": "^8.0.0"
+        "slash": "^4.0.0"
+      },
+      "dependencies": {
+        "slash": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
+          "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
+          "dev": true
+        }
       }
     },
     "@rollup/plugin-commonjs": {
@@ -12674,6 +10992,16 @@
         }
       }
     },
+    "@rollup/plugin-typescript": {
+      "version": "11.1.5",
+      "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz",
+      "integrity": "sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA==",
+      "dev": true,
+      "requires": {
+        "@rollup/pluginutils": "^5.0.1",
+        "resolve": "^1.22.1"
+      }
+    },
     "@rollup/pluginutils": {
       "version": "5.0.5",
       "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz",
@@ -12943,20 +11271,10 @@
       "version": "2.4.1",
       "dev": true
     },
-    "@types/parsimmon": {
-      "version": "1.10.6",
-      "dev": true
-    },
     "@types/resolve": {
       "version": "1.20.2",
       "dev": true
     },
-    "@types/semver": {
-      "version": "7.5.3",
-      "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
-      "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",
-      "dev": true
-    },
     "@types/yauzl": {
       "version": "2.10.0",
       "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
@@ -12967,41 +11285,6 @@
         "@types/node": "*"
       }
     },
-    "@typescript-eslint/eslint-plugin": {
-      "version": "5.62.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
-      "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
-      "dev": true,
-      "requires": {
-        "@eslint-community/regexpp": "^4.4.0",
-        "@typescript-eslint/scope-manager": "5.62.0",
-        "@typescript-eslint/type-utils": "5.62.0",
-        "@typescript-eslint/utils": "5.62.0",
-        "debug": "^4.3.4",
-        "graphemer": "^1.4.0",
-        "ignore": "^5.2.0",
-        "natural-compare-lite": "^1.4.0",
-        "semver": "^7.3.7",
-        "tsutils": "^3.21.0"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1",
-          "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
-          "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
-          "dev": true
-        },
-        "tsutils": {
-          "version": "3.21.0",
-          "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
-          "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
-          "dev": true,
-          "requires": {
-            "tslib": "^1.8.1"
-          }
-        }
-      }
-    },
     "@typescript-eslint/parser": {
       "version": "5.62.0",
       "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
@@ -13024,35 +11307,6 @@
         "@typescript-eslint/visitor-keys": "5.62.0"
       }
     },
-    "@typescript-eslint/type-utils": {
-      "version": "5.62.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz",
-      "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==",
-      "dev": true,
-      "requires": {
-        "@typescript-eslint/typescript-estree": "5.62.0",
-        "@typescript-eslint/utils": "5.62.0",
-        "debug": "^4.3.4",
-        "tsutils": "^3.21.0"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1",
-          "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
-          "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
-          "dev": true
-        },
-        "tsutils": {
-          "version": "3.21.0",
-          "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
-          "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
-          "dev": true,
-          "requires": {
-            "tslib": "^1.8.1"
-          }
-        }
-      }
-    },
     "@typescript-eslint/types": {
       "version": "5.62.0",
       "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
@@ -13091,40 +11345,6 @@
         }
       }
     },
-    "@typescript-eslint/utils": {
-      "version": "5.62.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
-      "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
-      "dev": true,
-      "requires": {
-        "@eslint-community/eslint-utils": "^4.2.0",
-        "@types/json-schema": "^7.0.9",
-        "@types/semver": "^7.3.12",
-        "@typescript-eslint/scope-manager": "5.62.0",
-        "@typescript-eslint/types": "5.62.0",
-        "@typescript-eslint/typescript-estree": "5.62.0",
-        "eslint-scope": "^5.1.1",
-        "semver": "^7.3.7"
-      },
-      "dependencies": {
-        "eslint-scope": {
-          "version": "5.1.1",
-          "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
-          "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
-          "dev": true,
-          "requires": {
-            "esrecurse": "^4.3.0",
-            "estraverse": "^4.1.1"
-          }
-        },
-        "estraverse": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
-          "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
-          "dev": true
-        }
-      }
-    },
     "@typescript-eslint/visitor-keys": {
       "version": "5.62.0",
       "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
@@ -13420,58 +11640,10 @@
         "default-require-extensions": "^3.0.0"
       }
     },
-    "aproba": {
-      "version": "1.2.0",
-      "dev": true,
-      "optional": true
-    },
     "archy": {
       "version": "1.0.0",
       "dev": true
     },
-    "are-we-there-yet": {
-      "version": "1.1.7",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "delegates": "^1.0.0",
-        "readable-stream": "^2.0.6"
-      },
-      "dependencies": {
-        "isarray": {
-          "version": "1.0.0",
-          "dev": true,
-          "optional": true
-        },
-        "readable-stream": {
-          "version": "2.3.8",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "core-util-is": "~1.0.0",
-            "inherits": "~2.0.3",
-            "isarray": "~1.0.0",
-            "process-nextick-args": "~2.0.0",
-            "safe-buffer": "~5.1.1",
-            "string_decoder": "~1.1.1",
-            "util-deprecate": "~1.0.1"
-          }
-        },
-        "safe-buffer": {
-          "version": "5.1.2",
-          "dev": true,
-          "optional": true
-        },
-        "string_decoder": {
-          "version": "1.1.1",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "safe-buffer": "~5.1.0"
-          }
-        }
-      }
-    },
     "arg": {
       "version": "4.1.3",
       "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
@@ -13537,55 +11709,6 @@
       "version": "1.12.0",
       "dev": true
     },
-    "babel-code-frame": {
-      "version": "6.26.0",
-      "dev": true,
-      "requires": {
-        "chalk": "^1.1.3",
-        "esutils": "^2.0.2",
-        "js-tokens": "^3.0.2"
-      },
-      "dependencies": {
-        "ansi-regex": {
-          "version": "2.1.1",
-          "dev": true
-        },
-        "ansi-styles": {
-          "version": "2.2.1",
-          "dev": true
-        },
-        "chalk": {
-          "version": "1.1.3",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^2.2.1",
-            "escape-string-regexp": "^1.0.2",
-            "has-ansi": "^2.0.0",
-            "strip-ansi": "^3.0.0",
-            "supports-color": "^2.0.0"
-          }
-        },
-        "escape-string-regexp": {
-          "version": "1.0.5",
-          "dev": true
-        },
-        "js-tokens": {
-          "version": "3.0.2",
-          "dev": true
-        },
-        "strip-ansi": {
-          "version": "3.0.1",
-          "dev": true,
-          "requires": {
-            "ansi-regex": "^2.0.0"
-          }
-        },
-        "supports-color": {
-          "version": "2.0.0",
-          "dev": true
-        }
-      }
-    },
     "balanced-match": {
       "version": "1.0.2",
       "dev": true
@@ -13715,10 +11838,6 @@
       "version": "3.3.0",
       "dev": true
     },
-    "builtins": {
-      "version": "1.0.3",
-      "dev": true
-    },
     "bundle-name": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
@@ -13810,13 +11929,6 @@
         "supports-color": "^7.1.0"
       }
     },
-    "charm": {
-      "version": "1.0.2",
-      "dev": true,
-      "requires": {
-        "inherits": "^2.0.1"
-      }
-    },
     "check-error": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
@@ -13849,10 +11961,6 @@
         }
       }
     },
-    "chownr": {
-      "version": "2.0.0",
-      "dev": true
-    },
     "chrome-trace-event": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
@@ -13917,11 +12025,6 @@
         }
       }
     },
-    "code-point-at": {
-      "version": "1.1.0",
-      "dev": true,
-      "optional": true
-    },
     "color-convert": {
       "version": "2.0.1",
       "dev": true,
@@ -13946,10 +12049,6 @@
         "delayed-stream": "~1.0.0"
       }
     },
-    "command-exists": {
-      "version": "1.2.9",
-      "dev": true
-    },
     "commander": {
       "version": "9.5.0",
       "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
@@ -13972,16 +12071,6 @@
       "version": "0.0.1",
       "dev": true
     },
-    "concat-stream": {
-      "version": "2.0.0",
-      "dev": true,
-      "requires": {
-        "buffer-from": "^1.0.0",
-        "inherits": "^2.0.3",
-        "readable-stream": "^3.0.2",
-        "typedarray": "^0.0.6"
-      }
-    },
     "connect": {
       "version": "3.7.0",
       "dev": true,
@@ -14005,11 +12094,6 @@
         }
       }
     },
-    "console-control-strings": {
-      "version": "1.1.0",
-      "dev": true,
-      "optional": true
-    },
     "content-type": {
       "version": "1.0.5",
       "dev": true
@@ -14291,11 +12375,6 @@
       "version": "1.0.0",
       "dev": true
     },
-    "delegates": {
-      "version": "1.0.0",
-      "dev": true,
-      "optional": true
-    },
     "depd": {
       "version": "2.0.0",
       "dev": true
@@ -14980,52 +13059,14 @@
         "universalify": "^2.0.0"
       }
     },
-    "fs-minipass": {
-      "version": "2.1.0",
-      "dev": true,
-      "requires": {
-        "minipass": "^3.0.0"
-      }
-    },
     "fs.realpath": {
       "version": "1.0.0",
       "dev": true
     },
     "fsevents": {
-      "version": "2.3.2",
-      "dev": true,
-      "optional": true
-    },
-    "fstream": {
-      "version": "1.0.12",
-      "dev": true,
-      "requires": {
-        "graceful-fs": "^4.1.2",
-        "inherits": "~2.0.0",
-        "mkdirp": ">=0.5 0",
-        "rimraf": "2"
-      },
-      "dependencies": {
-        "glob": {
-          "version": "7.2.3",
-          "dev": true,
-          "requires": {
-            "fs.realpath": "^1.0.0",
-            "inflight": "^1.0.4",
-            "inherits": "2",
-            "minimatch": "^3.1.1",
-            "once": "^1.3.0",
-            "path-is-absolute": "^1.0.0"
-          }
-        },
-        "rimraf": {
-          "version": "2.7.1",
-          "dev": true,
-          "requires": {
-            "glob": "^7.1.3"
-          }
-        }
-      }
+      "version": "2.3.2",
+      "dev": true,
+      "optional": true
     },
     "function-bind": {
       "version": "1.1.1",
@@ -15045,54 +13086,6 @@
       "version": "1.2.3",
       "dev": true
     },
-    "gauge": {
-      "version": "2.7.4",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "aproba": "^1.0.3",
-        "console-control-strings": "^1.0.0",
-        "has-unicode": "^2.0.0",
-        "object-assign": "^4.1.0",
-        "signal-exit": "^3.0.0",
-        "string-width": "^1.0.1",
-        "strip-ansi": "^3.0.1",
-        "wide-align": "^1.1.0"
-      },
-      "dependencies": {
-        "ansi-regex": {
-          "version": "2.1.1",
-          "dev": true,
-          "optional": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "1.0.0",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "number-is-nan": "^1.0.0"
-          }
-        },
-        "string-width": {
-          "version": "1.0.2",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "code-point-at": "^1.0.0",
-            "is-fullwidth-code-point": "^1.0.0",
-            "strip-ansi": "^3.0.0"
-          }
-        },
-        "strip-ansi": {
-          "version": "3.0.1",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-regex": "^2.0.0"
-          }
-        }
-      }
-    },
     "gensync": {
       "version": "1.0.0-beta.2",
       "dev": true
@@ -15282,19 +13275,6 @@
         "function-bind": "^1.1.1"
       }
     },
-    "has-ansi": {
-      "version": "2.0.0",
-      "dev": true,
-      "requires": {
-        "ansi-regex": "^2.0.0"
-      },
-      "dependencies": {
-        "ansi-regex": {
-          "version": "2.1.1",
-          "dev": true
-        }
-      }
-    },
     "has-bigints": {
       "version": "1.0.2",
       "dev": true
@@ -15325,11 +13305,6 @@
         "has-symbols": "^1.0.2"
       }
     },
-    "has-unicode": {
-      "version": "2.0.1",
-      "dev": true,
-      "optional": true
-    },
     "hasha": {
       "version": "5.2.2",
       "dev": true,
@@ -15890,13 +13865,6 @@
       "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
       "dev": true
     },
-    "json-stable-stringify": {
-      "version": "1.0.2",
-      "dev": true,
-      "requires": {
-        "jsonify": "^0.0.1"
-      }
-    },
     "json-stable-stringify-without-jsonify": {
       "version": "1.0.1",
       "dev": true
@@ -15917,10 +13885,6 @@
         "universalify": "^2.0.0"
       }
     },
-    "jsonify": {
-      "version": "0.0.1",
-      "dev": true
-    },
     "jsonparse": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
@@ -16662,21 +14626,6 @@
         "kind-of": "^6.0.3"
       }
     },
-    "minipass": {
-      "version": "3.3.6",
-      "dev": true,
-      "requires": {
-        "yallist": "^4.0.0"
-      }
-    },
-    "minizlib": {
-      "version": "2.1.2",
-      "dev": true,
-      "requires": {
-        "minipass": "^3.0.0",
-        "yallist": "^4.0.0"
-      }
-    },
     "mkdirp": {
       "version": "0.5.6",
       "dev": true,
@@ -16868,12 +14817,6 @@
       "version": "1.4.0",
       "dev": true
     },
-    "natural-compare-lite": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
-      "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
-      "dev": true
-    },
     "negotiator": {
       "version": "0.6.3",
       "dev": true
@@ -16961,15 +14904,6 @@
       "version": "3.0.0",
       "dev": true
     },
-    "npm-package-arg": {
-      "version": "8.1.5",
-      "dev": true,
-      "requires": {
-        "hosted-git-info": "^4.0.1",
-        "semver": "^7.3.4",
-        "validate-npm-package-name": "^3.0.0"
-      }
-    },
     "npm-run-all": {
       "version": "4.1.5",
       "dev": true,
@@ -17079,22 +15013,6 @@
         "path-key": "^3.0.0"
       }
     },
-    "npmlog": {
-      "version": "4.1.2",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "are-we-there-yet": "~1.1.2",
-        "console-control-strings": "~1.1.0",
-        "gauge": "~2.7.3",
-        "set-blocking": "~2.0.0"
-      }
-    },
-    "number-is-nan": {
-      "version": "1.0.1",
-      "dev": true,
-      "optional": true
-    },
     "nwmatcher": {
       "version": "1.4.4",
       "dev": true
@@ -17383,10 +15301,6 @@
       "version": "1.3.3",
       "dev": true
     },
-    "parsimmon": {
-      "version": "1.18.1",
-      "dev": true
-    },
     "path-exists": {
       "version": "4.0.0",
       "dev": true
@@ -17505,11 +15419,6 @@
         "fast-diff": "^1.1.2"
       }
     },
-    "process-nextick-args": {
-      "version": "2.0.1",
-      "dev": true,
-      "optional": true
-    },
     "process-on-spawn": {
       "version": "1.0.0",
       "dev": true,
@@ -17855,10 +15764,6 @@
         "signal-exit": "^3.0.2"
       }
     },
-    "retry": {
-      "version": "0.12.0",
-      "dev": true
-    },
     "reusify": {
       "version": "1.0.4",
       "dev": true
@@ -18092,10 +15997,6 @@
         }
       }
     },
-    "slide": {
-      "version": "1.1.6",
-      "dev": true
-    },
     "smob": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz",
@@ -18210,13 +16111,6 @@
         "tweetnacl": "~0.14.0"
       }
     },
-    "ssri": {
-      "version": "8.0.1",
-      "dev": true,
-      "requires": {
-        "minipass": "^3.1.1"
-      }
-    },
     "statuses": {
       "version": "1.5.0",
       "dev": true
@@ -18351,10 +16245,6 @@
         "min-indent": "^1.0.0"
       }
     },
-    "strip-json-comments": {
-      "version": "2.0.1",
-      "dev": true
-    },
     "supports-color": {
       "version": "7.2.0",
       "dev": true,
@@ -18386,28 +16276,6 @@
       "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
       "dev": true
     },
-    "tar": {
-      "version": "6.1.15",
-      "dev": true,
-      "requires": {
-        "chownr": "^2.0.0",
-        "fs-minipass": "^2.0.0",
-        "minipass": "^5.0.0",
-        "minizlib": "^2.1.1",
-        "mkdirp": "^1.0.3",
-        "yallist": "^4.0.0"
-      },
-      "dependencies": {
-        "minipass": {
-          "version": "5.0.0",
-          "dev": true
-        },
-        "mkdirp": {
-          "version": "1.0.4",
-          "dev": true
-        }
-      }
-    },
     "tar-fs": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
@@ -18622,129 +16490,6 @@
       "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==",
       "dev": true
     },
-    "tslint": {
-      "version": "5.14.0",
-      "dev": true,
-      "requires": {
-        "babel-code-frame": "^6.22.0",
-        "builtin-modules": "^1.1.1",
-        "chalk": "^2.3.0",
-        "commander": "^2.12.1",
-        "diff": "^3.2.0",
-        "glob": "^7.1.1",
-        "js-yaml": "^3.7.0",
-        "minimatch": "^3.0.4",
-        "mkdirp": "^0.5.1",
-        "resolve": "^1.3.2",
-        "semver": "^5.3.0",
-        "tslib": "^1.8.0",
-        "tsutils": "^2.29.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "3.2.1",
-          "dev": true,
-          "requires": {
-            "color-convert": "^1.9.0"
-          }
-        },
-        "argparse": {
-          "version": "1.0.10",
-          "dev": true,
-          "requires": {
-            "sprintf-js": "~1.0.2"
-          }
-        },
-        "builtin-modules": {
-          "version": "1.1.1",
-          "dev": true
-        },
-        "chalk": {
-          "version": "2.4.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^3.2.1",
-            "escape-string-regexp": "^1.0.5",
-            "supports-color": "^5.3.0"
-          }
-        },
-        "color-convert": {
-          "version": "1.9.3",
-          "dev": true,
-          "requires": {
-            "color-name": "1.1.3"
-          }
-        },
-        "color-name": {
-          "version": "1.1.3",
-          "dev": true
-        },
-        "commander": {
-          "version": "2.20.3",
-          "dev": true
-        },
-        "diff": {
-          "version": "3.5.0",
-          "dev": true
-        },
-        "escape-string-regexp": {
-          "version": "1.0.5",
-          "dev": true
-        },
-        "glob": {
-          "version": "7.2.3",
-          "dev": true,
-          "requires": {
-            "fs.realpath": "^1.0.0",
-            "inflight": "^1.0.4",
-            "inherits": "2",
-            "minimatch": "^3.1.1",
-            "once": "^1.3.0",
-            "path-is-absolute": "^1.0.0"
-          }
-        },
-        "has-flag": {
-          "version": "3.0.0",
-          "dev": true
-        },
-        "js-yaml": {
-          "version": "3.14.1",
-          "dev": true,
-          "requires": {
-            "argparse": "^1.0.7",
-            "esprima": "^4.0.0"
-          }
-        },
-        "semver": {
-          "version": "5.7.1",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "5.5.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^3.0.0"
-          }
-        },
-        "tslib": {
-          "version": "1.14.1",
-          "dev": true
-        }
-      }
-    },
-    "tsutils": {
-      "version": "2.29.0",
-      "dev": true,
-      "requires": {
-        "tslib": "^1.8.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1",
-          "dev": true
-        }
-      }
-    },
     "tunnel-agent": {
       "version": "0.6.0",
       "dev": true,
@@ -18792,10 +16537,6 @@
         "is-typed-array": "^1.1.9"
       }
     },
-    "typedarray": {
-      "version": "0.0.6",
-      "dev": true
-    },
     "typedarray-to-buffer": {
       "version": "3.1.5",
       "dev": true,
@@ -18896,13 +16637,6 @@
         "spdx-expression-parse": "^3.0.0"
       }
     },
-    "validate-npm-package-name": {
-      "version": "3.0.0",
-      "dev": true,
-      "requires": {
-        "builtins": "^1.0.3"
-      }
-    },
     "vary": {
       "version": "1.1.2",
       "dev": true
@@ -19032,36 +16766,6 @@
         "is-typed-array": "^1.1.10"
       }
     },
-    "wide-align": {
-      "version": "1.1.5",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "string-width": "^1.0.2 || 2 || 3 || 4"
-      },
-      "dependencies": {
-        "emoji-regex": {
-          "version": "8.0.0",
-          "dev": true,
-          "optional": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "3.0.0",
-          "dev": true,
-          "optional": true
-        },
-        "string-width": {
-          "version": "4.2.3",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "emoji-regex": "^8.0.0",
-            "is-fullwidth-code-point": "^3.0.0",
-            "strip-ansi": "^6.0.1"
-          }
-        }
-      }
-    },
     "word-wrap": {
       "version": "1.2.4",
       "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
diff --git a/package.json b/package.json
index d2dcf81..e3b0a14 100644
--- a/package.json
+++ b/package.json
@@ -3,28 +3,40 @@
   "version": "4.0.1",
   "description": "HTML to DOM parser.",
   "author": "Mark <mark@remarkablemark.org>",
-  "main": "index.js",
-  "module": "index.mjs",
+  "main": "lib/index.js",
+  "module": "esm/index.mjs",
   "exports": {
-    "import": "./index.mjs",
-    "require": "./index.js"
+    ".": {
+      "import": "./esm/index.mjs",
+      "require": "./lib/index.js"
+    },
+    "./lib/client/*": {
+      "import": "./esm/client/*.mjs",
+      "require": "./lib/client/*.js"
+    },
+    "./lib/server/*": {
+      "import": "./esm/server/*.mjs",
+      "require": "./lib/server/*.js"
+    }
   },
   "scripts": {
-    "build": "rollup --config --failAfterWarnings",
-    "clean": "rm -rf dist",
+    "build": "run-p build:*",
+    "build:cjs": "tsc",
+    "build:umd": "rollup --config --failAfterWarnings",
+    "clean": "rm -rf .nyc_output coverage dist lib",
     "lint": "eslint . --ignore-path .gitignore",
-    "lint:dts": "dtslint .",
     "lint:fix": "npm run lint -- --fix",
+    "lint:tsc": "tsc --noEmit",
     "postinstall": "husky install",
     "postpublish": "pinst --enable",
-    "prepublishOnly": "pinst --disable && run-s lint lint:dts test:server clean build",
+    "prepublishOnly": "pinst --disable && run-s lint lint:tsc test:server clean build",
     "size-limit": "size-limit",
     "test": "run-s test:server test:client",
     "test:client": "npm run test:client:watch -- --single-run",
     "test:client:build": "NODE_ENV=test npm run build",
     "test:client:watch": "npm run test:client:build && karma start",
-    "test:module": "node --test test/module",
-    "test:server": "nyc mocha test/server"
+    "test:esm": "npm run build:cjs && node --test test/esm",
+    "test:server": "nyc mocha -r ts-node/register test/server --ignore esm"
   },
   "repository": {
     "type": "git",
@@ -48,10 +60,11 @@
   "devDependencies": {
     "@commitlint/cli": "17.8.0",
     "@commitlint/config-conventional": "17.8.0",
-    "@definitelytyped/dtslint": "0.0.182",
+    "@rollup/plugin-alias": "5.0.1",
     "@rollup/plugin-commonjs": "25.0.7",
     "@rollup/plugin-node-resolve": "15.2.3",
     "@rollup/plugin-terser": "0.4.4",
+    "@rollup/plugin-typescript": "11.1.5",
     "@size-limit/preset-big-lib": "9.0.0",
     "@types/estree": "1.0.2",
     "@typescript-eslint/parser": "5.62.0",
@@ -81,17 +94,15 @@
   },
   "files": [
     "/dist",
-    "/index.d.ts",
-    "/index.js",
-    "/index.mjs",
+    "/esm",
     "/lib"
   ],
   "browser": {
-    "./index.js": "./lib/client/html-to-dom.js",
-    "./index.mjs": "./lib/client/html-to-dom.mjs"
+    "./lib/index.js": "./lib/client/html-to-dom.js",
+    "./esm/index.mjs": "./esm/client/html-to-dom.mjs"
   },
   "react-native": {
-    "./index.js": "./lib/server/html-to-dom.js"
+    "./lib/index.js": "./lib/server/html-to-dom.js"
   },
   "license": "MIT"
 }
diff --git a/rollup.config.mjs b/rollup.config.mjs
index 36007a4..b3c8117 100644
--- a/rollup.config.mjs
+++ b/rollup.config.mjs
@@ -1,16 +1,39 @@
+import alias from '@rollup/plugin-alias';
 import commonjs from '@rollup/plugin-commonjs';
 import resolve from '@rollup/plugin-node-resolve';
 import terser from '@rollup/plugin-terser';
+import typescript from '@rollup/plugin-typescript';
 
 const getConfig = (minify = false) => ({
-  input: 'index.js',
+  input: 'src/index.ts',
+
   output: {
     file: `dist/html-dom-parser${minify ? '.min' : ''}.js`,
     format: 'umd',
     name: 'HTMLDOMParser',
-    sourcemap: true
+    sourcemap: true,
   },
-  plugins: [commonjs(), resolve({ browser: true }), minify && terser()]
+
+  plugins: [
+    alias({
+      entries: [
+        {
+          find: './server/html-to-dom',
+          replacement: './client/html-to-dom',
+        },
+      ],
+    }),
+
+    typescript({
+      declaration: false,
+      declarationMap: false,
+      module: 'esnext',
+    }),
+
+    commonjs(),
+    resolve({ browser: true }),
+    minify && terser(),
+  ],
 });
 
 const configs = [getConfig(), getConfig(true)];
@@ -22,9 +45,9 @@ if (process.env.NODE_ENV === 'test') {
       file: 'dist/htmlparser2.js',
       format: 'umd',
       name: 'htmlparser2',
-      sourcemap: true
+      sourcemap: true,
     },
-    plugins: [commonjs(), resolve({ browser: true })]
+    plugins: [commonjs(), resolve({ browser: true })],
   });
 }
 
diff --git a/src/client/constants.ts b/src/client/constants.ts
new file mode 100644
index 0000000..b073d45
--- /dev/null
+++ b/src/client/constants.ts
@@ -0,0 +1,46 @@
+/**
+ * SVG elements are case-sensitive.
+ *
+ * @see https://developer.mozilla.org/docs/Web/SVG/Element#svg_elements_a_to_z
+ */
+export const CASE_SENSITIVE_TAG_NAMES = [
+  'animateMotion',
+  'animateTransform',
+  'clipPath',
+  'feBlend',
+  'feColorMatrix',
+  'feComponentTransfer',
+  'feComposite',
+  'feConvolveMatrix',
+  'feDiffuseLighting',
+  'feDisplacementMap',
+  'feDropShadow',
+  'feFlood',
+  'feFuncA',
+  'feFuncB',
+  'feFuncG',
+  'feFuncR',
+  'feGaussianBlur',
+  'feImage',
+  'feMerge',
+  'feMergeNode',
+  'feMorphology',
+  'feOffset',
+  'fePointLight',
+  'feSpecularLighting',
+  'feSpotLight',
+  'feTile',
+  'feTurbulence',
+  'foreignObject',
+  'linearGradient',
+  'radialGradient',
+  'textPath',
+] as const;
+
+export const CASE_SENSITIVE_TAG_NAMES_MAP = CASE_SENSITIVE_TAG_NAMES.reduce(
+  (accumulator, tagName) => {
+    accumulator[tagName.toLowerCase()] = tagName;
+    return accumulator;
+  },
+  {} as Record<string, string>,
+);
diff --git a/src/client/domparser.ts b/src/client/domparser.ts
new file mode 100644
index 0000000..df49b65
--- /dev/null
+++ b/src/client/domparser.ts
@@ -0,0 +1,160 @@
+// constants
+const HTML = 'html';
+const HEAD = 'head';
+const BODY = 'body';
+const FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; // e.g., <h1>
+
+// match-all-characters in case of newlines (DOTALL)
+const HEAD_TAG_REGEX = /<head[^]*>/i;
+const BODY_TAG_REGEX = /<body[^]*>/i;
+
+// falls back to `parseFromString` if `createHTMLDocument` cannot be used
+// eslint-disable-next-line no-unused-vars
+let parseFromDocument = (html: string, tagName?: string): Document => {
+  throw new Error(
+    'This browser does not support `document.implementation.createHTMLDocument`',
+  );
+};
+
+// eslint-disable-next-line no-unused-vars
+let parseFromString = (html: string, tagName?: string): Document => {
+  throw new Error(
+    'This browser does not support `DOMParser.prototype.parseFromString`',
+  );
+};
+
+let DOMParser = typeof window === 'object' && window.DOMParser;
+
+/**
+ * DOMParser (performance: slow).
+ *
+ * @see https://developer.mozilla.org/docs/Web/API/DOMParser#Parsing_an_SVG_or_HTML_document
+ */
+if (typeof DOMParser === 'function') {
+  const domParser = new DOMParser();
+  const mimeType = 'text/html';
+
+  /**
+   * Creates an HTML document using `DOMParser.parseFromString`.
+   *
+   * @param html - The HTML string.
+   * @param tagName - The element to render the HTML (with 'body' as fallback).
+   * @returns - Document.
+   */
+  parseFromString = (html: string, tagName?: string): Document => {
+    if (tagName) {
+      html = `<${tagName}>${html}</${tagName}>`;
+    }
+
+    return domParser.parseFromString(html, mimeType);
+  };
+
+  parseFromDocument = parseFromString;
+}
+
+/**
+ * DOMImplementation (performance: fair).
+ *
+ * @see https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument
+ */
+if (typeof document === 'object' && document.implementation) {
+  const htmlDocument = document.implementation.createHTMLDocument();
+
+  /**
+   * Use HTML document created by `document.implementation.createHTMLDocument`.
+   *
+   * @param html - The HTML string.
+   * @param tagName - The element to render the HTML (with 'body' as fallback).
+   * @returns - Document
+   */
+  parseFromDocument = function (html: string, tagName?: string): Document {
+    if (tagName) {
+      const element = htmlDocument.documentElement.querySelector(tagName);
+
+      if (element) {
+        element.innerHTML = html;
+      }
+
+      return htmlDocument;
+    }
+
+    htmlDocument.documentElement.innerHTML = html;
+    return htmlDocument;
+  };
+}
+
+/**
+ * Template (performance: fast).
+ *
+ * @see https://developer.mozilla.org/docs/Web/HTML/Element/template
+ */
+const template =
+  typeof document === 'object' && document.createElement('template');
+
+// eslint-disable-next-line no-unused-vars
+let parseFromTemplate: (html: string) => NodeList;
+
+if (template && template.content) {
+  /**
+   * Uses a template element (content fragment) to parse HTML.
+   *
+   * @param html - HTML string.
+   * @returns - Nodes.
+   */
+  parseFromTemplate = (html: string): NodeList => {
+    template.innerHTML = html;
+    return template.content.childNodes;
+  };
+}
+
+/**
+ * Parses HTML string to DOM nodes.
+ *
+ * @param html - HTML markup.
+ * @returns - DOM nodes.
+ */
+export default function domparser(html: string): NodeList {
+  const match = html.match(FIRST_TAG_REGEX);
+  const firstTagName = match && match[1] ? match[1].toLowerCase() : '';
+
+  switch (firstTagName) {
+    case HTML: {
+      const doc = parseFromString(html);
+
+      // the created document may come with filler head/body elements,
+      // so make sure to remove them if they don't actually exist
+      if (!HEAD_TAG_REGEX.test(html)) {
+        const element = doc.querySelector(HEAD);
+        element?.parentNode?.removeChild(element);
+      }
+
+      if (!BODY_TAG_REGEX.test(html)) {
+        const element = doc.querySelector(BODY);
+        element?.parentNode?.removeChild(element);
+      }
+
+      return doc.querySelectorAll(HTML);
+    }
+
+    case HEAD:
+    case BODY: {
+      const elements = parseFromDocument(html).querySelectorAll(firstTagName);
+
+      // if there's a sibling element, then return both elements
+      if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) {
+        return elements[0].parentNode!.childNodes;
+      }
+
+      return elements;
+    }
+
+    // low-level tag or text
+    default: {
+      if (parseFromTemplate) {
+        return parseFromTemplate(html);
+      }
+      const element = parseFromDocument(html, BODY).querySelector(BODY);
+      return element!.childNodes;
+    }
+  }
+}
diff --git a/src/client/html-to-dom.ts b/src/client/html-to-dom.ts
new file mode 100644
index 0000000..c2db1ee
--- /dev/null
+++ b/src/client/html-to-dom.ts
@@ -0,0 +1,26 @@
+import domparser from './domparser';
+import { formatDOM } from './utilities';
+
+const DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/; // e.g., <!doctype html>
+
+/**
+ * Parses HTML string to DOM nodes in browser.
+ *
+ * @param html - HTML markup.
+ * @returns - DOM elements.
+ */
+export default function HTMLDOMParser(html: string) {
+  if (typeof html !== 'string') {
+    throw new TypeError('First argument must be a string');
+  }
+
+  if (html === '') {
+    return [];
+  }
+
+  // match directive
+  const match = html.match(DIRECTIVE_REGEX);
+  const directive = match ? match[1] : undefined;
+
+  return formatDOM(domparser(html), null, directive);
+}
diff --git a/src/client/utilities.ts b/src/client/utilities.ts
new file mode 100644
index 0000000..5441ab9
--- /dev/null
+++ b/src/client/utilities.ts
@@ -0,0 +1,136 @@
+import { Comment, Element, ProcessingInstruction, Text } from 'domhandler';
+import { CASE_SENSITIVE_TAG_NAMES_MAP } from './constants';
+
+/**
+ * Gets case-sensitive tag name.
+ *
+ * @param tagName - Tag name in lowercase.
+ * @returns - Case-sensitive tag name.
+ */
+function getCaseSensitiveTagName(tagName: string): string | undefined {
+  return CASE_SENSITIVE_TAG_NAMES_MAP[tagName];
+}
+
+/**
+ * Formats DOM attributes to a hash map.
+ *
+ * @param attributes - List of attributes.
+ * @returns - Map of attribute name to value.
+ */
+export function formatAttributes(attributes: NamedNodeMap) {
+  const map: Record<string, string> = {};
+  let index = 0;
+  const attributesLength = attributes.length;
+
+  // `NamedNodeMap` is array-like
+  for (; index < attributesLength; index++) {
+    const attribute = attributes[index];
+    map[attribute.name] = attribute.value;
+  }
+
+  return map;
+}
+
+/**
+ * Corrects the tag name if it is case-sensitive (SVG).
+ * Otherwise, returns the lowercase tag name (HTML).
+ *
+ * @param tagName - Lowercase tag name.
+ * @returns - Formatted tag name.
+ */
+function formatTagName(tagName: string): string {
+  tagName = tagName.toLowerCase();
+  const caseSensitiveTagName = getCaseSensitiveTagName(tagName);
+
+  if (caseSensitiveTagName) {
+    return caseSensitiveTagName;
+  }
+
+  return tagName;
+}
+
+/**
+ * Transforms DOM nodes to `domhandler` nodes.
+ *
+ * @param nodes - DOM nodes.
+ * @param parent - Parent node.
+ * @param directive - Directive.
+ * @returns - Nodes.
+ */
+export function formatDOM(
+  nodes: NodeList,
+  parent: Element | null = null,
+  directive?: string,
+): (Comment | Element | ProcessingInstruction | Text)[] {
+  const result = [];
+  let current;
+  let index = 0;
+  const nodesLength = nodes.length;
+
+  for (; index < nodesLength; index++) {
+    const node = nodes[index];
+
+    // set the node data given the type
+    switch (node.nodeType) {
+      case 1: {
+        const tagName = formatTagName(node.nodeName);
+
+        // script, style, or tag
+        current = new Element(
+          tagName,
+          formatAttributes((node as HTMLElement).attributes),
+        );
+
+        current.children = formatDOM(
+          // template children are on content
+          tagName === 'template'
+            ? (node as HTMLTemplateElement).content.childNodes
+            : node.childNodes,
+          current,
+        );
+
+        break;
+      }
+
+      case 3:
+        current = new Text(node.nodeValue!);
+        break;
+
+      case 8:
+        current = new Comment(node.nodeValue!);
+        break;
+
+      default:
+        continue;
+    }
+
+    // set previous node next
+    const prev = result[index - 1] || null;
+    if (prev) {
+      prev.next = current;
+    }
+
+    // set properties for current node
+    current.parent = parent;
+    current.prev = prev;
+    current.next = null;
+
+    result.push(current);
+  }
+
+  if (directive) {
+    current = new ProcessingInstruction(
+      directive.substring(0, directive.indexOf(' ')).toLowerCase(),
+      directive,
+    );
+    current.next = result[0] || null;
+    current.parent = parent;
+    result.unshift(current);
+
+    if (result[1]) {
+      result[1].prev = result[0];
+    }
+  }
+
+  return result;
+}
diff --git a/index.js b/src/index.ts
similarity index 59%
rename from index.js
rename to src/index.ts
index c861c83..0c62726 100644
--- a/index.js
+++ b/src/index.ts
@@ -4,7 +4,4 @@
  *
  * @see {@link https://github.com/substack/node-browserify#browser-field}
  */
-var HTMLDOMParser = require('./lib/server/html-to-dom');
-
-module.exports = HTMLDOMParser;
-module.exports.default = HTMLDOMParser;
+export { default } from './server/html-to-dom';
diff --git a/src/server/html-to-dom.ts b/src/server/html-to-dom.ts
new file mode 100644
index 0000000..31db1e3
--- /dev/null
+++ b/src/server/html-to-dom.ts
@@ -0,0 +1,34 @@
+import { Parser } from 'htmlparser2';
+import { DomHandler } from 'domhandler';
+import type { DomHandlerOptions } from 'domhandler';
+
+import { unsetRootParent } from './utilities';
+
+/**
+ * Parses HTML string to DOM nodes in Node.js.
+ *
+ * This is the same method as `require('htmlparser2').parseDOM`
+ *
+ * @see https://github.com/fb55/htmlparser2/blob/v9.0.0/src/index.ts#L44-L46
+ * @see https://github.com/fb55/domhandler/tree/v5.0.3#readme
+ *
+ * @param html - HTML markup.
+ * @param options - Parser options.
+ * @returns - DOM nodes.
+ */
+export default function HTMLDOMParser(
+  html: string,
+  options?: DomHandlerOptions
+) {
+  if (typeof html !== 'string') {
+    throw new TypeError('First argument must be a string.');
+  }
+
+  if (html === '') {
+    return [];
+  }
+
+  const handler = new DomHandler(undefined, options);
+  new Parser(handler, options).end(html);
+  return unsetRootParent(handler.dom);
+}
diff --git a/src/server/utilities.ts b/src/server/utilities.ts
new file mode 100644
index 0000000..8b667a5
--- /dev/null
+++ b/src/server/utilities.ts
@@ -0,0 +1,27 @@
+import type {
+  ChildNode,
+  Comment,
+  Element,
+  ProcessingInstruction,
+  Text
+} from 'domhandler';
+
+type Node = Element | Text | Comment | ProcessingInstruction;
+
+/**
+ * Sets root parent to null.
+ *
+ * @param nodes - Nodes.
+ * @returns - Nodes.
+ */
+export function unsetRootParent(nodes: ChildNode[]): Node[] {
+  let index = 0;
+  const nodesLength = nodes.length;
+
+  for (; index < nodesLength; index++) {
+    const node = nodes[index];
+    node.parent = null;
+  }
+
+  return nodes as Node[];
+}
diff --git a/tsconfig.json b/tsconfig.json
index 74714c5..80882f7 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,26 +1,15 @@
 {
   "compilerOptions": {
+    "target": "es5",
     "module": "commonjs",
-    "lib": ["es6", "dom"],
-    "noImplicitAny": true,
-    "noImplicitThis": true,
-    "strictNullChecks": true,
-    "strictFunctionTypes": true,
-    "baseUrl": ".",
-    "noEmit": true,
+    "lib": ["es5", "dom"],
+    "esModuleInterop": true,
+    "declaration": true,
+    "declarationMap": true,
+    "sourceMap": true,
     "forceConsistentCasingInFileNames": true,
-    "paths": {
-      "html-dom-parser": ["."],
-      "html-dom-parser/lib/*": ["./lib/*"]
-    }
+    "strict": true,
+    "outDir": "lib"
   },
-  "files": [
-    "index.d.ts",
-    "lib/client/constants.d.ts",
-    "lib/client/domparser.d.ts",
-    "lib/client/html-to-dom.d.ts",
-    "lib/client/utilities.d.ts",
-    "lib/server/html-to-dom.d.ts",
-    "test/types/index.test.ts"
-  ]
+  "include": ["src"]
 }
diff --git a/tslint.json b/tslint.json
deleted file mode 100644
index 21eedfc..0000000
--- a/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  "extends": "@definitelytyped/dtslint/dtslint.json",
-  "rules": {
-    "no-redundant-jsdoc": false
-  }
-}


Test patch:
diff --git a/test/cases/html.js b/test/cases/html.js
index c23e358..d747d5a 100644
--- a/test/cases/html.js
+++ b/test/cases/html.js
@@ -2,223 +2,223 @@ module.exports = [
   // html tags
   {
     name: 'empty html',
-    data: '<html></html>'
+    data: '<html></html>',
   },
   {
     name: 'html with attribute',
-    data: '<html lang="en"></html>'
+    data: '<html lang="en"></html>',
   },
   {
     name: 'html with empty head and body',
-    data: '<html><head></head><body></body></html>'
+    data: '<html><head></head><body></body></html>',
   },
   {
     name: 'html with empty head',
-    data: '<html><head></head></html>'
+    data: '<html><head></head></html>',
   },
   {
     name: 'html with empty body',
-    data: '<html><body></body></html>'
+    data: '<html><body></body></html>',
   },
   {
     name: 'unclosed html and head tags',
-    data: '<html><head>'
+    data: '<html><head>',
   },
   {
     name: 'unclosed html and body tags',
-    data: '<html><body>'
+    data: '<html><body>',
   },
   {
     name: 'unclosed html, head, and body tags',
-    data: '<html><head><body>'
+    data: '<html><head><body>',
   },
 
   // head and body tags
   {
     name: 'unclosed head',
-    data: '<head>'
+    data: '<head>',
   },
   {
     name: 'empty head',
-    data: '<head></head>'
+    data: '<head></head>',
   },
   {
     name: 'head with title',
-    data: '<head><title>Text</title></head>'
+    data: '<head><title>Text</title></head>',
   },
   {
     name: 'empty head and body',
-    data: '<head></head><body></body>'
+    data: '<head></head><body></body>',
   },
   {
     name: 'unclosed head and body',
-    data: '<head><body>'
+    data: '<head><body>',
   },
   {
     name: 'unclosed title',
-    data: '<title>'
+    data: '<title>',
   },
   {
     name: 'empty title',
-    data: '<title></title>'
+    data: '<title></title>',
   },
   {
     name: 'title with text',
-    data: '<title>text</title>'
+    data: '<title>text</title>',
   },
   {
     name: 'title with text as tags',
-    data: '<title><b>text</b></title>'
+    data: '<title><b>text</b></title>',
   },
   {
     name: 'unclosed body',
-    data: '<body>'
+    data: '<body>',
   },
   {
     name: 'empty body',
-    data: '<body></body>'
+    data: '<body></body>',
   },
   {
     name: 'capitalized body',
-    data: '<BODY></BODY>'
+    data: '<BODY></BODY>',
   },
   {
     name: 'body with paragraph',
-    data: '<body><p>text</p></body>'
+    data: '<body><p>text</p></body>',
   },
   {
     name: 'head and body with newline',
-    data: '<head></head><body\n>text</body>'
+    data: '<head></head><body\n>text</body>',
   },
   {
     name: 'head and body with whitespace and newlines',
-    data: '<head><title>hello</title></head><body \n\n >text</body>'
+    data: '<head><title>hello</title></head><body \n\n >text</body>',
   },
   {
     name: 'body with whitespace and newline',
-    data: '<body \n >text</body>'
+    data: '<body \n >text</body>',
   },
 
   // common tags
   {
     name: 'empty div',
-    data: '<div></div>'
+    data: '<div></div>',
   },
   {
     name: 'empty paragraph',
-    data: '<p></p>'
+    data: '<p></p>',
   },
   {
     name: 'paragraph with text',
-    data: '<p>text</p>'
+    data: '<p>text</p>',
   },
   {
     name: 'meta with attribute',
-    data: '<meta charset="utf-8">'
+    data: '<meta charset="utf-8">',
   },
   {
     name: 'meta with closing tag',
-    data: '<meta name="author" content="John Doe Mason" />'
+    data: '<meta name="author" content="John Doe Mason" />',
   },
   {
     name: 'textarea with value',
-    data: '<textarea>value</textarea>'
+    data: '<textarea>value</textarea>',
   },
   {
     name: 'multiple spans',
-    data: '<span>1</span><span>2</span>'
+    data: '<span>1</span><span>2</span>',
   },
 
   // void (self-closing) tags
   {
     name: 'void',
-    data: '<br>'
+    data: '<br>',
   },
   {
     name: 'self-closing void',
-    data: '<hr/>'
+    data: '<hr/>',
   },
   {
     name: 'input with attributes',
-    data: '<input type="text" value="value">'
+    data: '<input type="text" value="value">',
   },
   {
     name: 'image',
-    data: '<img src="https://httpbin.org/image/png" alt="Image">'
+    data: '<img src="https://httpbin.org/image/png" alt="Image">',
   },
   {
     name: 'multiple void',
-    data: '<link /><meta/><hr><input type="radio" checked />'
+    data: '<link /><meta/><hr><input type="radio" checked />',
   },
 
   // tag attributes
   {
     name: 'h1 with id attribute',
-    data: '<h1 id="heading"></h1>'
+    data: '<h1 id="heading"></h1>',
   },
   {
     name: 'h2 with class attribute',
-    data: '<h2 class="heading"></h2>'
+    data: '<h2 class="heading"></h2>',
   },
   {
     name: 'em with style attribute',
-    data: '<em style="color: white; z-index: 1; -webkit-appearance: none"></em>'
+    data: '<em style="color: white; z-index: 1; -webkit-appearance: none"></em>',
   },
   {
     name: 'data attribute',
-    data: '<div data-attribute="value"></div>'
+    data: '<div data-attribute="value"></div>',
   },
   {
     name: 'event attribute',
-    data: '<div onclick="alert();"></div>'
+    data: '<div onclick="alert();"></div>',
   },
   {
     name: 'span with multiple attributes',
-    data: '<span id="button" class="big" style="border: 1px solid #000; -moz-appearance: button;" aria-label="Back" />'
+    data: '<span id="button" class="big" style="border: 1px solid #000; -moz-appearance: button;" aria-label="Back" />',
   },
   {
     name: 'hr with multiple attributes',
-    data: '<hr id="foo" class="bar baz" style="background: #fff; text-align: center;" data-foo="bar">'
+    data: '<hr id="foo" class="bar baz" style="background: #fff; text-align: center;" data-foo="bar">',
   },
 
   // adjacent tags
   {
     name: 'sibling',
-    data: '<li>brother</li><li>sister</li>'
+    data: '<li>brother</li><li>sister</li>',
   },
 
   // nested tags
   {
     name: 'nested definition list',
-    data: '<dl><dt>foo</dt><dd>bar<span>baz</span></dd></dl>'
+    data: '<dl><dt>foo</dt><dd>bar<span>baz</span></dd></dl>',
   },
   {
     name: 'nested unordered list',
-    data: '<ul><li>foo<span>bar</span></li><li>baz</li></ul>'
+    data: '<ul><li>foo<span>bar</span></li><li>baz</li></ul>',
   },
 
   // script tag
   {
     name: 'empty script',
-    data: '<script></script>'
+    data: '<script></script>',
   },
   {
     name: 'script',
-    data: '<script>console.log(1 < 2);</script>'
+    data: '<script>console.log(1 < 2);</script>',
   },
   {
     name: 'script with json',
-    data: '<script type="application/json">{"foo":"bar"}</script>'
+    data: '<script type="application/json">{"foo":"bar"}</script>',
   },
 
   // noscript tag
   {
     name: 'empty noscript',
-    data: '<noscript></noscript>'
+    data: '<noscript></noscript>',
   },
   {
     name: 'noscript with text',
-    data: '<noscript>JS is not enabled</noscript>'
+    data: '<noscript>JS is not enabled</noscript>',
   },
   {
     name: 'noscript with p',
@@ -228,114 +228,114 @@ module.exports = [
       // template renders noscript children as text instead of nodes
       var isJSDOM = typeof window === 'object' && window.name === 'nodejs';
       return isJSDOM;
-    }
+    },
   },
 
   // template tag
   {
     name: 'empty template',
-    data: '<template></template>'
+    data: '<template></template>',
   },
   {
     name: 'template with content',
-    data: '<template><article><p>Test</p></article></template>'
+    data: '<template><article><p>Test</p></article></template>',
   },
 
   // style tag
   {
     name: 'empty style',
-    data: '<style></style>'
+    data: '<style></style>',
   },
   {
     name: 'style',
-    data: '<style>body > .foo { color: #f00; }</style>'
+    data: '<style>body > .foo { color: #f00; }</style>',
   },
 
   // html5 tags
   {
     name: 'audio',
-    data: '<audio controls="controls" preload="none" width="640">'
+    data: '<audio controls="controls" preload="none" width="640">',
   },
 
   // html entities
   {
     name: 'non-breaking space',
-    data: '&nbsp;'
+    data: '&nbsp;',
   },
   {
     name: 'en dash',
-    data: '&ndash;'
+    data: '&ndash;',
   },
   {
     name: 'em dash',
-    data: '&mdash;'
+    data: '&mdash;',
   },
 
   // directive
   {
     name: 'directive',
-    data: '<!doctype html>'
+    data: '<!doctype html>',
   },
   {
     name: 'directive with html',
-    data: '<!DOCTYPE html><html></html>'
+    data: '<!DOCTYPE html><html></html>',
   },
 
   // comment
   {
     name: 'comment',
-    data: '<!-- comment -->'
+    data: '<!-- comment -->',
   },
   {
     name: 'conditional comment',
-    data: '<!--[if lt IE 9]>Below IE 9<![endif]-->'
+    data: '<!--[if lt IE 9]>Below IE 9<![endif]-->',
   },
 
   // text
   {
     name: 'empty string',
-    data: ''
+    data: '',
   },
   {
     name: 'text',
-    data: 'text'
+    data: 'text',
   },
   {
     name: 'space',
-    data: ' '
+    data: ' ',
   },
 
   // custom tag
   {
     name: 'custom tag',
-    data: '<custom>'
+    data: '<custom>',
   },
   {
     name: 'custom tags',
-    data: '<foo><bar>'
+    data: '<foo><bar>',
   },
 
   // invalid
   {
     name: 'self-closing div',
-    data: '<div/>'
+    data: '<div/>',
   },
   {
     name: 'self-closing div and p',
-    data: '<div/><p/>'
+    data: '<div/><p/>',
   },
 
   // misc
   {
     name: 'unclosed tag',
-    data: '<div>'
+    data: '<div>',
   },
   {
     name: 'unclosed tags',
-    data: '<p><span>'
+    data: '<p><span>',
   },
   {
     name: 'closing tag',
-    data: '</div>'
-  }
+    data: '</div>',
+  },
 ];
diff --git a/test/cases/index.js b/test/cases/index.js
index 31e13d7..029d9b5 100644
--- a/test/cases/index.js
+++ b/test/cases/index.js
@@ -18,19 +18,19 @@ const html = [
   {
     name: 'complex html',
     data: minify(read('./complex.html'), {
-      collapseWhitespace: true
-    })
-  }
+      collapseWhitespace: true,
+    }),
+  },
 ];
 
 const svg = [
   {
     name: 'complex svg',
-    data: read('./complex.svg')
-  }
+    data: read('./complex.svg'),
+  },
 ];
 
 module.exports = {
   html,
-  svg
+  svg,
 };
diff --git a/test/client/index.js b/test/client/index.js
index 212ec46..4b27836 100644
--- a/test/client/index.js
+++ b/test/client/index.js
@@ -1,24 +1,24 @@
-var htmlCases = require('../cases/html');
-var serverParser = require('../../dist/htmlparser2').parseDOM;
-var clientParser = require('../../dist/html-dom-parser');
-var helpers = require('../helpers');
+const htmlCases = require('../cases/html');
+const serverParser = require('../../dist/htmlparser2').parseDOM;
+const clientParser = require('../../dist/html-dom-parser');
+const helpers = require('../helpers');
 
-var assert = window.assert;
+const assert = window.assert;
 
-describe('client parser', function () {
+describe('client parser', () => {
   helpers.throwErrors(assert, clientParser);
   helpers.runTests(assert, clientParser, serverParser, htmlCases);
   helpers.testCaseSensitiveTags(assert, clientParser);
 
-  describe('performance', function () {
-    it('executes 1000 times in less than 50ms', function () {
-      var times = 1000;
-      var start = performance.now();
+  describe('performance', () => {
+    it('executes 1000 times in less than 50ms', () => {
+      let times = 1000;
+      const start = performance.now();
       while (--times) {
         clientParser('<div>test</div>');
       }
-      var end = performance.now();
-      var elapsed = end - start;
+      const end = performance.now();
+      const elapsed = end - start;
       assert.isBelow(elapsed, 50);
     });
   });
diff --git a/test/esm/client.test.mjs b/test/esm/client.test.mjs
new file mode 100644
index 0000000..ef0c9cb
--- /dev/null
+++ b/test/esm/client.test.mjs
@@ -0,0 +1,24 @@
+import { describe, it } from 'node:test';
+
+import assert from 'assert';
+
+import parse from '../../esm/client/html-to-dom.mjs';
+
+describe('client', () => {
+  it('exports default function', () => {
+    assert.strictEqual(typeof parse, 'function');
+  });
+
+  it('throws error on Node.js', () => {
+    assert.throws(
+      () => {
+        parse('<br>');
+      },
+      {
+        name: 'Error',
+        message:
+          'This browser does not support `document.implementation.createHTMLDocument`',
+      },
+    );
+  });
+});
diff --git a/test/esm/index.test.mjs b/test/esm/index.test.mjs
new file mode 100644
index 0000000..e4129c5
--- /dev/null
+++ b/test/esm/index.test.mjs
@@ -0,0 +1,27 @@
+import { describe, it } from 'node:test';
+
+import assert from 'assert';
+
+import parse from '../../esm/index.mjs';
+
+describe('index', () => {
+  it('exports default function', () => {
+    assert.strictEqual(typeof parse, 'function');
+  });
+
+  it('parses HTML to DOM nodes', () => {
+    assert.deepEqual(parse('<br>'), [
+      {
+        attribs: {},
+        children: [],
+        endIndex: null,
+        name: 'br',
+        next: null,
+        parent: null,
+        prev: null,
+        startIndex: null,
+        type: 'tag',
+      },
+    ]);
+  });
+});
diff --git a/test/esm/server.test.mjs b/test/esm/server.test.mjs
new file mode 100644
index 0000000..a4f6028
--- /dev/null
+++ b/test/esm/server.test.mjs
@@ -0,0 +1,27 @@
+import { describe, it } from 'node:test';
+
+import assert from 'assert';
+
+import parse from '../../esm/server/html-to-dom.mjs';
+
+describe('server', () => {
+  it('exports default function', () => {
+    assert.strictEqual(typeof parse, 'function');
+  });
+
+  it('parses HTML to DOM nodes', () => {
+    assert.deepEqual(parse('<hr>'), [
+      {
+        attribs: {},
+        children: [],
+        endIndex: null,
+        name: 'hr',
+        next: null,
+        parent: null,
+        prev: null,
+        startIndex: null,
+        type: 'tag',
+      },
+    ]);
+  });
+});
diff --git a/test/helpers/cycle.js b/test/helpers/cycle.js
index 7ede280..e98ab4c 100644
--- a/test/helpers/cycle.js
+++ b/test/helpers/cycle.js
@@ -107,7 +107,7 @@ if (typeof JSON.decycle !== 'function') {
           Object.keys(value).forEach(function (name) {
             nu[name] = derez(
               value[name],
-              path + '[' + JSON.stringify(name) + ']'
+              path + '[' + JSON.stringify(name) + ']',
             );
           });
         }
diff --git a/test/helpers/index.js b/test/helpers/index.js
index ccd10c9..433c7d7 100644
--- a/test/helpers/index.js
+++ b/test/helpers/index.js
@@ -1,5 +1,3 @@
-module.exports = {
-  runTests: require('./run-tests'),
-  testCaseSensitiveTags: require('./test-case-sensitive-tags'),
-  throwErrors: require('./throw-errors')
-};
+exports.runTests = require('./run-tests');
+exports.testCaseSensitiveTags = require('./test-case-sensitive-tags');
+exports.throwErrors = require('./throw-errors');
diff --git a/test/helpers/run-tests.js b/test/helpers/run-tests.js
index 591ae26..19288e5 100644
--- a/test/helpers/run-tests.js
+++ b/test/helpers/run-tests.js
@@ -1,6 +1,6 @@
-var unsetRootParent = require('../../lib/server/utilities').unsetRootParent;
+const { unsetRootParent } = require('../../lib/server/utilities');
 
-var isKarma =
+const isKarma =
   typeof window === 'object' && typeof window.__karma__ === 'object';
 
 /**
@@ -11,13 +11,18 @@ var isKarma =
  * @param {Function} actualParser   - Actual parser.
  * @param {Function} expectedParser - Expected parser.
  */
-function runTests(assert, actualParser, expectedParser, testCases) {
+module.exports = function runTests(
+  assert,
+  actualParser,
+  expectedParser,
+  testCases,
+) {
   testCases.forEach(function (testCase) {
-    var _it = testCase.only ? it.only : testCase.skip ? it.skip : it;
+    const _it = testCase.only ? it.only : testCase.skip ? it.skip : it;
 
     _it('parses ' + testCase.name, function () {
-      var actualOutput = actualParser(testCase.data);
-      var expectedOutput = unsetRootParent(expectedParser(testCase.data));
+      let actualOutput = actualParser(testCase.data);
+      let expectedOutput = unsetRootParent(expectedParser(testCase.data));
 
       // use `JSON.decycle` since `assert.deepEqual` fails
       // when instance types are different in the browser
@@ -29,6 +34,4 @@ function runTests(assert, actualParser, expectedParser, testCases) {
       assert.deepEqual(actualOutput, expectedOutput);
     });
   });
-}
-
-module.exports = runTests;
+};
diff --git a/test/helpers/test-case-sensitive-tags.js b/test/helpers/test-case-sensitive-tags.js
index 47f14c0..356df44 100644
--- a/test/helpers/test-case-sensitive-tags.js
+++ b/test/helpers/test-case-sensitive-tags.js
@@ -1,17 +1,15 @@
-var constants = require('../../lib/client/constants');
+const constants = require('../../lib/client/constants');
 
 /**
  * Tests case-sensitive tags (SVG) to make sure their case is preserved.
  *
  * @param {Function} parser - The parser.
  */
-function testCaseSensitiveTags(assert, parser) {
-  it('preserves case of case-sensitive SVG tags', function () {
-    constants.CASE_SENSITIVE_TAG_NAMES.forEach(function (tag) {
-      var parsed = parser('<' + tag + '></' + tag + '>');
+module.exports = function testCaseSensitiveTags(assert, parser) {
+  it('preserves case of case-sensitive SVG tags', () => {
+    constants.CASE_SENSITIVE_TAG_NAMES.forEach((tag) => {
+      const parsed = parser(`<${tag}></${tag}>`);
       assert.equal(parsed[0].name, tag);
     });
   });
-}
-
-module.exports = testCaseSensitiveTags;
+};
diff --git a/test/helpers/throw-errors.js b/test/helpers/throw-errors.js
index 90eeb36..5ace9b8 100644
--- a/test/helpers/throw-errors.js
+++ b/test/helpers/throw-errors.js
@@ -1,4 +1,4 @@
-var values = [
+const values = [
   undefined,
   null,
   0,
@@ -7,8 +7,8 @@ var values = [
   false,
   {},
   [],
-  function () {},
-  new Date()
+  () => {},
+  new Date(),
 ];
 
 /**
@@ -17,17 +17,15 @@ var values = [
  * @param {Function} assert         - Assert.
  * @param {Function} expectedParser - Expected parser.
  */
-function throwErrors(assert, expectedParser) {
-  values.forEach(function (value) {
-    var type =
+module.exports = function throwErrors(assert, expectedParser) {
+  values.forEach((value) => {
+    const type =
       value instanceof Object ? value.constructor.name : JSON.stringify(value);
 
-    it('throws error for argument: ' + type, function () {
+    it(`throws error for argument: ${type}`, () => {
       assert.throws(function () {
         expectedParser(value);
       }, TypeError);
     });
   });
-}
-
-module.exports = throwErrors;
+};
diff --git a/test/module/index.test.mjs b/test/module/index.test.mjs
deleted file mode 100644
index 80d4982..0000000
--- a/test/module/index.test.mjs
+++ /dev/null
@@ -1,50 +0,0 @@
-import { describe, it } from 'node:test';
-
-import assert from 'assert';
-
-import HTMLDOMParser from '../../index.mjs';
-import HTMLDOMParserClient from '../../lib/client/html-to-dom.mjs';
-
-describe('index', () => {
-  it('exports default function', () => {
-    assert.strictEqual(typeof HTMLDOMParser, 'function');
-  });
-
-  it('parses HTML to DOM object', () => {
-    assert.deepEqual(HTMLDOMParser('<br>'), [
-      {
-        attribs: {},
-        children: [],
-        endIndex: null,
-        name: 'br',
-        next: null,
-        parent: null,
-        prev: null,
-        startIndex: null,
-        type: 'tag'
-      }
-    ]);
-  });
-});
-
-describe('index', () => {
-  it('exports default function', () => {
-    assert.strictEqual(typeof HTMLDOMParserClient, 'function');
-  });
-
-  it('parses HTML to DOM object', () => {
-    assert.deepEqual(HTMLDOMParser('<hr>'), [
-      {
-        attribs: {},
-        children: [],
-        endIndex: null,
-        name: 'hr',
-        next: null,
-        parent: null,
-        prev: null,
-        startIndex: null,
-        type: 'tag'
-      }
-    ]);
-  });
-});
diff --git a/test/server/client.js b/test/server/client.js
index 4b15597..e0d8893 100644
--- a/test/server/client.js
+++ b/test/server/client.js
@@ -1,10 +1,10 @@
 const { expect } = require('chai');
-const utilities = require('../../lib/client/utilities');
+const { formatDOM } = require('../../src/client/utilities');
 
-describe('client utilities', function () {
-  describe('formatDOM', function () {
-    it('continues loop when nodeType is undefined', function () {
-      expect(utilities.formatDOM([{ nodeType: undefined }])).to.deep.equal([]);
+describe('client utilities', () => {
+  describe('formatDOM', () => {
+    it('continues loop when nodeType is undefined', () => {
+      expect(formatDOM([{ nodeType: undefined }])).to.deep.equal([]);
     });
   });
 });
diff --git a/test/server/index.js b/test/server/index.js
index bddd563..d14c7a6 100644
--- a/test/server/index.js
+++ b/test/server/index.js
@@ -3,7 +3,7 @@ const sinon = require('sinon');
 const mock = require('mock-require');
 
 function resetModules() {
-  Object.keys(require.cache).forEach(key => {
+  Object.keys(require.cache).forEach((key) => {
     delete require.cache[key];
   });
 }
@@ -22,8 +22,8 @@ const DomHandler = sinon.spy(function () {
       children: [],
       next: null,
       prev: null,
-      parent: null
-    }
+      parent: null,
+    },
   ];
 });
 
@@ -33,7 +33,7 @@ describe('server parser', () => {
   // before
   mock('htmlparser2', { Parser });
   mock('domhandler', { DomHandler });
-  const parse = require('../..');
+  const parse = require('../../src').default;
 
   it('calls `DomHandler` and `Parser`', () => {
     parse(html);
diff --git a/test/server/server.js b/test/server/server.js
index 172b2e0..4cb5018 100644
--- a/test/server/server.js
+++ b/test/server/server.js
@@ -5,7 +5,7 @@ const { runTests, testCaseSensitiveTags, throwErrors } = require('../helpers');
 
 describe('server parser', () => {
   // before
-  const serverParser = require('../..');
+  const serverParser = require('../../src').default;
 
   // tests
   throwErrors(assert, serverParser);
@@ -19,7 +19,7 @@ describe('client parser in jsdom', () => {
   // before
   const jsdomify = require('jsdomify').default;
   jsdomify.create();
-  const clientParser = require('../../lib/client/html-to-dom');
+  const clientParser = require('../../src/client/html-to-dom').default;
 
   // tests
   throwErrors(assert, clientParser);
diff --git a/test/types/index.test.ts b/test/types/index.test.ts
index 57abe12..574408d 100644
--- a/test/types/index.test.ts
+++ b/test/types/index.test.ts
@@ -1,4 +1,4 @@
-import parse from 'html-dom-parser';
+import parse from '../../lib';
 
 // $ExpectType (Element | Text | Comment | ProcessingInstruction)[]
 parse('<div>text</div>');