Skip to content

fix(semantic): add TS1016 error code to required parameter after optional diagnostic#16685

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/12-10-fix_semantic_add_ts1016_error_code_to_required_parameter_after_optional_diagnostic
Dec 10, 2025
Merged

fix(semantic): add TS1016 error code to required parameter after optional diagnostic#16685
graphite-app[bot] merged 1 commit intomainfrom
c/12-10-fix_semantic_add_ts1016_error_code_to_required_parameter_after_optional_diagnostic

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Dec 10, 2025

@github-actions github-actions bot added A-semantic Area - Semantic C-bug Category - Bug labels Dec 10, 2025
Copy link
Contributor Author

camc314 commented Dec 10, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 marked this pull request as ready for review December 10, 2025 10:38
@camc314 camc314 requested a review from Dunqing as a code owner December 10, 2025 10:38
Copilot AI review requested due to automatic review settings December 10, 2025 10:38
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 10, 2025

CodSpeed Performance Report

Merging #16685 will not alter performance

Comparing c/12-10-fix_semantic_add_ts1016_error_code_to_required_parameter_after_optional_diagnostic (e5f53ea) with main (2495a39)1

Summary

✅ 42 untouched
⏩ 3 skipped2

Footnotes

  1. No successful run was found on main (bd1db8b) during the generation of this report, so 2495a39 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Contributor

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 PR adds the TypeScript error code TS(1016) to the diagnostic message for "A required parameter cannot follow an optional parameter" error. This improves consistency with TypeScript's official error reporting and helps developers identify and reference this specific error.

Key Changes

  • Modified the required_parameter_after_optional_parameter function to use the ts_error helper with error code "1016"
  • Updated parser snapshot files to reflect the new error message format with the error code prefix

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
crates/oxc_semantic/src/checker/typescript.rs Changed from OxcDiagnostic::error() to ts_error("1016", ...) for consistency with other TypeScript diagnostics
tasks/coverage/snapshots/parser_typescript.snap Updated 2 occurrences of the error message to include TS(1016): prefix
tasks/coverage/snapshots/parser_babel.snap Updated 6 occurrences of the error message to include TS(1016): prefix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 10, 2025
Copy link
Member

Boshen commented Dec 10, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the c/12-10-fix_semantic_add_ts1016_error_code_to_required_parameter_after_optional_diagnostic branch from e5f53ea to de08f5b Compare December 10, 2025 11:57
@graphite-app graphite-app bot force-pushed the c/12-10-fix_semantic_add_ts1016_error_code_to_required_parameter_after_optional_diagnostic branch from de08f5b to 0be98b9 Compare December 10, 2025 12:00
@graphite-app graphite-app bot merged commit 0be98b9 into main Dec 10, 2025
20 checks passed
@graphite-app graphite-app bot deleted the c/12-10-fix_semantic_add_ts1016_error_code_to_required_parameter_after_optional_diagnostic branch December 10, 2025 12:07
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 10, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants