Skip to content

Commit 8270c32

Browse files
committed
chore: add @types/svgdom now that it exists
1 parent ccfc4a4 commit 8270c32

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
},
4343
"devDependencies": {
4444
"@tsconfig/node18": "^18.0.0",
45+
"@types/svgdom": "^0.1.2",
4546
"eslint": "^8.18.0",
4647
"eslint-config-prettier": "^9.0.0",
4748
"eslint-plugin-node": "^11.1.0",

src/svg.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
// returns a window with a document and an svg root node
2-
// @ts-ignore No `@types/svgdom` exists yet unfortunately
31
import { createSVGWindow } from "svgdom";
42
import { SVG, registerWindow, namespaces } from "@svgdotjs/svg.js";
53

4+
// returns a window with a document and an svg root node
65
const window = createSVGWindow();
76
const document = window.document;
8-
97
// register window and document
108
registerWindow(window, document);
119

0 commit comments

Comments
 (0)