paoloricciuti / sveltekit-search-params

The easiest way to read and WRITE from query parameters in sveltekit.
https://sveltekit-search-params.netlify.app
MIT License
478 stars 13 forks source link

Value is nullable if default value is provided #75

Closed olehmisar closed 3 weeks ago

olehmisar commented 5 months ago

Describe the bug

image

type of page should be Writable<number>

Reproduction

<script>
  import { queryParam, ssp } from "sveltekit-search-params";

  $: page = queryParam("p", ssp.number());
</script>

Logs

No response

paoloricciuti commented 5 months ago

I've tried and failed to make this work...but if you can I'll enjoy this enhancement 😁