-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
The new types for bindablity might work for simple types but for a complex component that uses many generics, it seems that they destroy the types. specially if other components inherit a component with generic type parameters. generics that were working fine before the update now no longer work. Honestly, I don't understand why svelte should be the one to add this type to every property without them knowing about it. The user should be the one to decide whether a property MUST be bind to or it can be bind to. Especially since Svelte's typescript with generics is so slow and inconsistent that it makes you hate library development with typescript.
Wrapping entire types in generics like WithBindable or things like that ruins generics in svelte. I had occasions where simply trying to omit a property from the result of a generic type destroys it. It's really hard for me to recreate the issue but I request a way to opt out of this, otherwise further upgrades will be impossible for me. Atleast allow the user themselves to wrap their props' type with Bindable or better, let them decide that on each property themselves like
type Test = {
something?: Bindable<string>;
}Reproduction
currently can't reproduce the issue in a simple and small type
Logs
No response
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
Memory: 4.94 GB / 15.63 GB
Binaries:
Node: 18.14.2 - C:\Program Files\nodejs\node.EXE
npm: 9.7.1 - C:\Program Files\nodejs\npm.CMD
bun: 1.1.3 - ~\.bun\bin\bun.EXE
Browsers:
Edge: Chromium (123.0.2420.97)
Internet Explorer: 11.0.22621.1
npmPackages:
svelte: ^5.0.0-next.115 => 5.0.0-next.115Severity
annoyance