We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I wrap an optional value in a writable store, it becomes non-optional.
These 2 lines are all you need:
let value: string | undefined; let store = writable(value);
The type of store is Writable<string>.
store
Writable<string>
I can work around it by manually specifying the type:
let store = writable<string | undefined>(value);
But it's weird that this is necessary.
No response
System: OS: macOS 14.5 CPU: (10) arm64 Apple M1 Max Memory: 48.22 MB / 32.00 GB Shell: 3.7.1 - /opt/homebrew/bin/fish Binaries: Node: 18.17.1 - ~/Library/pnpm/node npm: 9.6.7 - ~/Library/pnpm/npm pnpm: 8.15.3 - ~/Library/pnpm/pnpm Browsers: Safari: 17.5 npmPackages: svelte: ^4.2.18 => 4.2.18
annoyance
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When I wrap an optional value in a writable store, it becomes non-optional.
Reproduction
These 2 lines are all you need:
The type of
store
isWritable<string>
.I can work around it by manually specifying the type:
But it's weird that this is necessary.
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: