Skip to content

docs: fix mergeProps documentation to match actual implementation#234

Merged
seungrodotlee merged 2 commits into
toss:mainfrom
moreal:docs/mergeProps-type
Jun 1, 2025
Merged

docs: fix mergeProps documentation to match actual implementation#234
seungrodotlee merged 2 commits into
toss:mainfrom
moreal:docs/mergeProps-type

Conversation

@moreal
Copy link
Copy Markdown
Contributor

@moreal moreal commented May 9, 2025

Overview

This pull request corrects the mergeProps' documentation where the variadic argument is represented as props instead of ...props.

Current mergeProps function's implementation:

export function mergeProps<PropsList extends BaseProps[]>(...props: PropsList): TupleToIntersection<PropsList> {

But current mergeProps documentation doesn't let readers know props argument is variable:

```ts
function mergeProps<PropsList>(
props: PropsList
): TupleToIntersection<PropsList>;
```

So this pull request changes the above lines like following lines:

```ts
function mergeProps<PropsList>(
...props: PropsList
): TupleToIntersection<PropsList>;
```

Checklist

  • Did you write the test code?
    • This pull request doesn't make changes about implementations and types.
  • 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?
    • This pull request doesn't make changes about implementations and types.

@moreal moreal marked this pull request as ready for review May 9, 2025 06:30
Copilot AI review requested due to automatic review settings May 9, 2025 06:30
Copy link
Copy Markdown

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 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

Copy link
Copy Markdown
Contributor

@seungrodotlee seungrodotlee left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

@seungrodotlee seungrodotlee merged commit 7ce5cf7 into toss:main Jun 1, 2025
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.

3 participants