Skip to content

Commit

Permalink
fix: generate type definition with nullable types (#8924)
Browse files Browse the repository at this point in the history
This results in `undefined` and `null` being added explicitly in places which is crucial in some situations
  • Loading branch information
jasonlyu123 authored Jul 6, 2023
1 parent bb5d394 commit 0a2732a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-bags-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

fix: generate type definition with nullable types
3 changes: 3 additions & 0 deletions packages/svelte/scripts/generate-dts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0a2732a

Please sign in to comment.