You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Simplify TypeScript config requirements
Assignments are allowed in the constructor from 5.31.0 onward, so retaining the classes via ES2015 should be enough.
* Add back a little bit of detail.
Copy file name to clipboardExpand all lines: documentation/docs/07-misc/03-typescript.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ If you're using tools like Rollup or Webpack instead, install their respective S
83
83
84
84
When using TypeScript, make sure your `tsconfig.json` is setup correctly.
85
85
86
-
- Use a [`target`](https://www.typescriptlang.org/tsconfig/#target) of at least `ES2022`, or a `target` of at least `ES2015`alongside [`useDefineForClassFields`](https://www.typescriptlang.org/tsconfig/#useDefineForClassFields). This ensures that rune declarations on class fields are not messed with, which would break the Svelte compiler
86
+
- Use a [`target`](https://www.typescriptlang.org/tsconfig/#target) of at least `ES2015`so classes are not compiled to functions
87
87
- Set [`verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig/#verbatimModuleSyntax) to `true` so that imports are left as-is
88
88
- Set [`isolatedModules`](https://www.typescriptlang.org/tsconfig/#isolatedModules) to `true` so that each file is looked at in isolation. TypeScript has a few features which require cross-file analysis and compilation, which the Svelte compiler and tooling like Vite don't do.
0 commit comments