Skip to content

fix(collections): accept readonly tuples in unzip - #7395

Open
Sion612 wants to merge 1 commit into
denoland:mainfrom
Sion612:fix/unzip-readonly-tuples-5831
Open

Sion612 wants to merge 1 commit into
denoland:mainfrom
Sion612:fix/unzip-readonly-tuples-5831

Conversation

@Sion612

@Sion612 Sion612 commented Nov 12, 2026

Copy link
Copy Markdown

Refs #5831

unzip() already accepts a readonly outer array. This change also allows each entry to be a readonly [T, U] tuple, so callers can pass an array of pairs declared with as const directly.

The return type remains [T[], U[]], and runtime behavior is unchanged. The regression test passes an as const input and checks both output arrays.

Validation

  • Before the fix, the regression input failed type checking with TS2345. With the fix, it type-checks successfully.
  • deno test -A --doc collections/ passed all 558 tests locally.
  • On Windows, deno task test passed 7,421 tests and reported 39 fs failures. The same 39 failures were reproduced against the unchanged baseline.
  • deno task ok did not complete: the repository-wide lint:docs stage encountered Windows error 206 (command-line length). The unchanged baseline reproduced this error.

@CLAassistant

CLAassistant commented Nov 12, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (f834d02) to head (a9c7c5e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7395      +/-   ##
==========================================
- Coverage   95.04%   95.03%   -0.02%     
==========================================
  Files         619      619              
  Lines       52012    51760     -252     
  Branches     9450     9403      -47     
==========================================
- Hits        49434    49188     -246     
+ Misses       2031     2022       -9     
- Partials      547      550       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants