Skip to content

Commit

Permalink
[fix] add DOM lib to create-svelte tsconfig (#1956)
Browse files Browse the repository at this point in the history
This makes the DOM ambient typings available to the user without errors. This is not 100% correct because on the server most of the typings are not available, but as soon as you want to use one of these, you need to add this to the lib list anyway. It also makes the svelte-kit package command export the correct dispatcher event types (#1943).
  • Loading branch information
dummdidumm authored Jul 19, 2021
1 parent ae3cec6 commit b9e6338
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/mean-pets-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Add DOM to lib in tsconfig
2 changes: 1 addition & 1 deletion packages/create-svelte/shared/+typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"moduleResolution": "node",
"module": "es2020",
"lib": ["es2020"],
"lib": ["es2020", "DOM"],
"target": "es2019",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
Expand Down

0 comments on commit b9e6338

Please sign in to comment.