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
{{ message }}
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
When I run 'npm run dev' or "npm run build', 'src/node_modules/@sapper/index.d.ts' gets generated, but it contains double declaration of all 4 modules. Here is how the file looks like:
This further causes that these 4 modules are not properly recognized. For example, if I do:
<scriptcontext="module">
importtype { Preload } from"@sapper/common";exportconst preload:Preload=asyncfunction(this, page, session) {const { user } = session;if (!user) {returnthis.redirect(302, 'login'); // TypeScript will know the type of `this` now }return { user }; }
</script>
I get the following error:
Cannot use namespace 'Preload' as a type.ts(2709)
To Reproduce
Just run 'npm run dev' or "npm run build' and look at the 'src/node_modules/@sapper/index.d.ts' file.
Expected behavior
To generate 'src/node_modules/@sapper/index.d.ts' without this block:
Describe the bug
When I run 'npm run dev' or "npm run build', 'src/node_modules/@sapper/index.d.ts' gets generated, but it contains double declaration of all 4 modules. Here is how the file looks like:
This further causes that these 4 modules are not properly recognized. For example, if I do:
I get the following error:
To Reproduce
Just run 'npm run dev' or "npm run build' and look at the 'src/node_modules/@sapper/index.d.ts' file.
Expected behavior
To generate 'src/node_modules/@sapper/index.d.ts' without this block:
Information about your Sapper Installation:
npx envinfo --system --npmPackages svelte,sapper,rollup,webpack --binaries --browsers
Severity
Blocks usage of TypeScript.
The text was updated successfully, but these errors were encountered: