diff --git a/.changeset/funny-bags-occur.md b/.changeset/funny-bags-occur.md new file mode 100644 index 000000000000..81f89bcd0f5d --- /dev/null +++ b/.changeset/funny-bags-occur.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: generate type definition with nullable types diff --git a/packages/svelte/scripts/generate-dts.js b/packages/svelte/scripts/generate-dts.js index fe4b70e09a61..0ecf7127dfd2 100644 --- a/packages/svelte/scripts/generate-dts.js +++ b/packages/svelte/scripts/generate-dts.js @@ -16,6 +16,9 @@ fs.writeFileSync('./types/compiler/interfaces.d.ts', `import '../index.js';`); await createBundle({ output: 'types/index.d.ts', + compilerOptions: { + strict: true + }, modules: { svelte: 'src/runtime/public.d.ts', 'svelte/compiler': 'src/compiler/public.d.ts',