-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
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
Value is nullable if default value is provided #75
Comments
I've tried and failed to make this work...but if you can I'll enjoy this enhancement 😁 |
gwax
added a commit
to gwax/sveltekit-search-params
that referenced
this issue
Jul 27, 2024
This change modifies the return type of queryParam to be Writable<T> instead of Writable<T | null> if options is included and specifies a defaultValue. We additionally modify the various ssp helper functions to return Writable<T> instead of Writable<T | null> when a default value is provided. Fixes paoloricciuti#75
gwax
added a commit
to gwax/sveltekit-search-params
that referenced
this issue
Jul 27, 2024
This change modifies the return type of queryParam to be Writable<T> instead of Writable<T | null> if options is included and specifies a defaultValue. We additionally modify the various ssp helper functions to return Writable<T> instead of Writable<T | null> when a default value is provided. Fixes paoloricciuti#75
gwax
added a commit
to gwax/sveltekit-search-params
that referenced
this issue
Jul 27, 2024
This change modifies the return type of queryParam to be Writable<T> instead of Writable<T | null> if options is included and specifies a defaultValue. We additionally modify the various ssp helper functions to return Writable<T> instead of Writable<T | null> when a default value is provided. Fixes paoloricciuti#75
paoloricciuti
added a commit
that referenced
this issue
Jul 28, 2024
* Return non-null writable for defined defaultValue This change modifies the return type of queryParam to be Writable<T> instead of Writable<T | null> if options is included and specifies a defaultValue. We additionally modify the various ssp helper functions to return Writable<T> instead of Writable<T | null> when a default value is provided. Fixes #75 * fix: default to string when nothing is passed * fix: queryParameters types * fix: update changeset to `breaking` --------- Co-authored-by: paoloricciuti <ricciutipaolo@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
type of
page
should beWritable<number>
Reproduction
Logs
No response
The text was updated successfully, but these errors were encountered: