docs: fix mergeProps documentation to match actual implementation#234
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the documentation for the mergeProps function to correctly reflect the use of a variadic argument using the spread operator.
- Corrects the function signature in mergeProps.md and its Korean version to use ...props.
- Aligns the documentation with the actual implementation of mergeProps.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/utils/mergeProps/mergeProps.md | Updated the function parameter from "props" to "...props". |
| src/utils/mergeProps/ko/mergeProps.md | Updated the function parameter from "props" to "...props" in the Korean docs. |
Comments suppressed due to low confidence (2)
src/utils/mergeProps/mergeProps.md:9
- The updated documentation correctly shows that mergeProps accepts a variadic number of arguments using the spread operator. Consider verifying that all related documentation examples also use the correct syntax for clarity.
...props: PropsList
src/utils/mergeProps/ko/mergeProps.md:9
- The Korean version of the documentation now mirrors the correct signature with the spread operator. Confirm that all localized documentation updates are consistent with this change.
...props: PropsList
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request corrects the
mergeProps' documentation where the variadic argument is represented aspropsinstead of...props.Current
mergePropsfunction's implementation:react-simplikit/src/utils/mergeProps/mergeProps.ts
Line 28 in 94f8826
But current
mergePropsdocumentation doesn't let readers knowpropsargument is variable:react-simplikit/src/utils/mergeProps/mergeProps.md
Lines 7 to 11 in 94f8826
So this pull request changes the above lines like following lines:
react-simplikit/src/utils/mergeProps/ko/mergeProps.md
Lines 7 to 11 in ce3b5ab
Checklist
yarn run fixto format and lint the code and docs?yarn run test:coverageto make sure there is no uncovered line?