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

fix: type ssp array #47

Closed paoloricciuti closed 8 months ago

paoloricciuti commented 8 months ago

Closes #44

Summary by CodeRabbit

changeset-bot[bot] commented 8 months ago

🦋 Changeset detected

Latest commit: 7c1b4ba3ec147da5ed6c7b1639f102a540f94591

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------------- | ----- | | sveltekit-search-params | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

coderabbitai[bot] commented 8 months ago

Walkthrough

The change involves a correction in the type definition of the array function within the sveltekit-search-params library. The defaultValue parameter for the array function has been updated to expect an array of type T[] instead of a single value of type T. This modification aligns the type expectation with the intended functionality of handling default values for arrays.

Changes

File Path Change Summary
src/lib/sveltekit-search-params.ts Updated the type of defaultValue parameter in array function from T to T[].

Assessment against linked issues

Objective Addressed Explanation
#44: Correct typing for the default value of an array param in ssp.array() helper The type has been changed from T to T[], which matches the issue's requirement.

Poem

In the code where types entwine,
A rabbit found a misalign.
With a hop and a fix in place,
Arrays now have their proper space. 🐇💻✨


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`
netlify[bot] commented 8 months ago

Deploy Preview for sveltekit-search-params ready!

Name Link
Latest commit 8f357c987d585107eb7495b29cf2852813960d0f
Latest deploy log https://app.netlify.com/sites/sveltekit-search-params/deploys/656f2cb6ab611100077631d3
Deploy Preview https://deploy-preview-47--sveltekit-search-params.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 8 months ago

Deploy Preview for sveltekit-search-params ready!

Name Link
Latest commit 7c1b4ba3ec147da5ed6c7b1639f102a540f94591
Latest deploy log https://app.netlify.com/sites/sveltekit-search-params/deploys/656f2cc78d6b70000817c02d
Deploy Preview https://deploy-preview-47--sveltekit-search-params.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.