+
Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

arendjr
Copy link
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
Copy link

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载