Skip to content

Conversation

wo-o29
Copy link
Contributor

@wo-o29 wo-o29 commented Sep 13, 2025

Overview

This PR improves the documentation of the useStorageState hook by explicitly specifying the types of the serializer and deserializer functions in the options parameter.

By defining serializer as (value: Serializable<T>) => string and deserializer as (value: string) => Serializable<T>, users can better understand the expected input and output types, enhancing code safety and usability.

This clarification helps users implement custom serialization logic correctly and improves the overall DX.

Before After
스크린샷 2025-09-13 오후 4 35 00 스크린샷 2025-09-13 오후 4 34 43

Checklist

  • Did you write the test code?
  • Have you run yarn run fix to format and lint the code and docs?
  • Have you run yarn run test:coverage to make sure there is no uncovered line?
  • Did you write the JSDoc?

@Copilot Copilot AI review requested due to automatic review settings September 13, 2025 07:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the documentation for the useStorageState hook by adding explicit type annotations for the serializer and deserializer function parameters, replacing generic "Function" types with specific function signatures that show input and output types.

  • Updated JSDoc comments in TypeScript source to include explicit function signatures
  • Updated documentation files to show precise function types instead of generic "Function"
  • Added generic type parameter <T> to Korean documentation interface example

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/hooks/useStorageState/useStorageState.ts Updated JSDoc comments to specify serializer/deserializer function types
src/hooks/useStorageState/useStorageState.md Updated documentation to show explicit function signatures for serializer/deserializer
src/hooks/useStorageState/ko/useStorageState.md Updated Korean documentation with function signatures and added generic type parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5bdb4ff) to head (a45dae4).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #274   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        37           
  Lines         1093      1093           
  Branches       324       324           
=========================================
  Hits          1093      1093           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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