-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the bug
When using HTMLAttributes<HTMLElement> as the props type for a component, where children is optional, if you don't provide children explicitly, by putting content within the components children or setting children={undefined} you get a type error.
It seems to occur specifically when Partial<> is used.
Reproduction
https://github.com/huntabyte/attachments-type-issue
Go to lib/another.svelte to see the behavior.
Logs
System Info
System:
OS: macOS 15.2
CPU: (12) arm64 Apple M2 Max
Memory: 143.69 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
pnpm: 9.14.4 - ~/Library/pnpm/pnpm
bun: 1.0.25 - ~/.bun/bin/bun
Browsers:
Edge: 136.0.3240.64
Safari: 18.2
npmPackages:
svelte: ^5.0.0 => 5.30.1Severity
blocking an upgrade
