Skip to content

Commit 0a2732a

Browse files
authored
fix: generate type definition with nullable types (#8924)
This results in `undefined` and `null` being added explicitly in places which is crucial in some situations
1 parent bb5d394 commit 0a2732a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/funny-bags-occur.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: generate type definition with nullable types

packages/svelte/scripts/generate-dts.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ fs.writeFileSync('./types/compiler/interfaces.d.ts', `import '../index.js';`);
1616

1717
await createBundle({
1818
output: 'types/index.d.ts',
19+
compilerOptions: {
20+
strict: true
21+
},
1922
modules: {
2023
svelte: 'src/runtime/public.d.ts',
2124
'svelte/compiler': 'src/compiler/public.d.ts',

0 commit comments

Comments
 (0)