Skip to content
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

fix: getItems, setItems types #395

Merged
merged 3 commits into from
Mar 14, 2024
Merged

fix: getItems, setItems types #395

merged 3 commits into from
Mar 14, 2024

Conversation

harlan-zw
Copy link
Contributor

@harlan-zw harlan-zw commented Feb 7, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The type isn't using the generic so the types are broken when augmenting with a generic.

image

For consistency with getItem we also allow augmenting at a function level getItems<{ foo: 'bar' }>.

Also seems like the value was only accepting string for setItems whcih I've included a fix for also.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

cloudflare-workers-and-pages bot commented Feb 7, 2024

Deploying with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: 2c82a40
Status:Β βœ…Β  Deploy successful!
Preview URL: https://6d58cb2e.unstorage.pages.dev
Branch Preview URL: https://fix-get-items-generic-type.unstorage.pages.dev

View logs

@harlan-zw harlan-zw changed the title fix: getItems generic type fix: getItems types Feb 7, 2024
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (f6841df) 64.79% compared to head (2c82a40) 64.81%.
Report is 2 commits behind head on main.

Files Patch % Lines
docs/docs.config.ts 0.00% 14 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #395      +/-   ##
==========================================
+ Coverage   64.79%   64.81%   +0.01%     
==========================================
  Files          41       40       -1     
  Lines        4071     4070       -1     
  Branches      489      488       -1     
==========================================
  Hits         2638     2638              
  Misses       1422     1422              
+ Partials       11       10       -1     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@harlan-zw harlan-zw changed the title fix: getItems types fix: getItems, setItems types Feb 7, 2024
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 merged commit 387018c into main Mar 14, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants