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
Copy file name to clipboardExpand all lines: documentation/docs/01-introduction/03-svelte-files.md
+2
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,8 @@ A `<script>` tag with a `module` attribute runs once when the module first evalu
50
50
51
51
You can `export` bindings from this block, and they will become exports of the compiled module. You cannot `export default`, since the default export is the component itself.
52
52
53
+
> [!NOTE] If you are using TypeScript and import such exports from a `module` block into a `.ts` file, make sure to have your editor setup so that TypeScript knows about them. This is the case for our VS Code extension and the IntelliJ plugin, in other cases you might need to setup our [TypeScript editor plugin](https://www.npmjs.com/package/typescript-svelte-plugin).
54
+
53
55
> [!LEGACY]
54
56
> In Svelte 4, this script tag was created using `<script context="module">`
0 commit comments