Skip to content

docs(Tuple): clarify 2-element tuple requirements#6162

Open
aymenhmaidiwastaken wants to merge 1 commit intoEffect-TS:mainfrom
aymenhmaidiwastaken:docs/tuple-2-element-clarity
Open

docs(Tuple): clarify 2-element tuple requirements#6162
aymenhmaidiwastaken wants to merge 1 commit intoEffect-TS:mainfrom
aymenhmaidiwastaken:docs/tuple-2-element-clarity

Conversation

@aymenhmaidiwastaken
Copy link
Copy Markdown

Summary

  • Add module-level note distinguishing 2-element-only functions from arbitrary-length ones
  • Update JSDoc for getFirst, getSecond, mapBoth, mapFirst, mapSecond, and swap to explicitly state they require tuples with exactly 2 elements
  • Add cross-references to arbitrary-length alternatives (at() and map())

No code changes — JSDoc only.

Closes #5069

Update module header and JSDoc for getFirst, getSecond, mapBoth,
mapFirst, mapSecond, and swap to explicitly state they only work with
2-element tuples (pairs). Add cross-references to arbitrary-length
alternatives like at() and map().

Closes Effect-TS#5069
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

⚠️ No Changeset found

Latest commit: 0c8dc66

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

Clarify length requirements in tuple documentation

1 participant