Skip to content

feat(core): infer sequence operator and update operators#6637

Merged
arendjr merged 1 commit intobiomejs:nextfrom
arendjr:sequence-operator
Jun 30, 2025
Merged

feat(core): infer sequence operator and update operators#6637
arendjr merged 1 commit intobiomejs:nextfrom
arendjr:sequence-operator

Conversation

@arendjr
Copy link
Copy Markdown
Contributor

@arendjr arendjr commented Jun 30, 2025

Summary

Type inference is now able to handle the sequence operator (,), as well as post- and pre-update operators: ++.

Fixes #6608.

Examples

let x = 5;

// We now infer that `x++` resolves to a number, while the expression as a whole
// becomes a Promise:
x++, new Promise((resolve) => resolve('comma'));

Test Plan

Test cases added.

@arendjr arendjr requested review from a team June 30, 2025 09:27
@arendjr arendjr added the A-Type-Inference Area: type inference label Jun 30, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 30, 2025

🦋 Changeset detected

Latest commit: e6c9c46

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions Bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Jun 30, 2025
@arendjr arendjr merged commit 6918085 into biomejs:next Jun 30, 2025
10 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter A-Type-Inference Area: type inference L-JavaScript Language: JavaScript and super languages

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant