fix(semantic): add TS1016 error code to required parameter after optional diagnostic#16685
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
CodSpeed Performance ReportMerging #16685 will not alter performanceComparing Summary
Footnotes
|
There was a problem hiding this comment.
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_parameterfunction to use thets_errorhelper 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.
Merge activity
|
…onal diagnostic (#16685) I noticed this while looking at https://discord.com/channels/1079625926024900739/1448256490904354931
e5f53ea to
de08f5b
Compare
…onal diagnostic (#16685) I noticed this while looking at https://discord.com/channels/1079625926024900739/1448256490904354931
de08f5b to
0be98b9
Compare
…onal diagnostic (#16685) I noticed this while looking at https://discord.com/channels/1079625926024900739/1448256490904354931
…onal diagnostic (oxc-project#16685) I noticed this while looking at https://discord.com/channels/1079625926024900739/1448256490904354931

I noticed this while looking at https://discord.com/channels/1079625926024900739/1448256490904354931