Skip to content

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Dec 4, 2025

No description provided.

@camc314 camc314 marked this pull request as ready for review December 4, 2025 21:59
@camc314 camc314 requested a review from Dunqing as a code owner December 4, 2025 21:59
Copilot AI review requested due to automatic review settings December 4, 2025 21:59
Copy link
Contributor Author

camc314 commented Dec 4, 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.

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(2390) to the "Constructor implementation is missing" diagnostic message, improving alignment with TypeScript's official error reporting format.

  • Converts the diagnostic function from using OxcDiagnostic::error() to ts_error("2390", ...) helper
  • Updates all 8 snapshot test occurrences to reflect the new error message format with the TS error code prefix

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/oxc_semantic/src/checker/typescript.rs Modified constructor_implementation_missing function to use ts_error helper with error code "2390"
tasks/coverage/snapshots/parser_typescript.snap Updated all 8 test snapshots to show the new error message format: × TS(2390): Constructor implementation is missing.

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

ts_error(code, format!("Abstract {elem_kind} can only appear within an abstract class."))
.with_label(span)
}

Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a doc comment to document the TypeScript error code, following the pattern used by other TS diagnostic functions in this file (e.g., line 217 /// TS(1392) and lines 233-234). This helps developers quickly identify which TypeScript error corresponds to this diagnostic.

Suggested addition:

/// TS(2390)
fn constructor_implementation_missing(span: Span) -> OxcDiagnostic {
Suggested change
/// TS(2390)

Copilot uses AI. Check for mistakes.
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 4, 2025

CodSpeed Performance Report

Merging #16517 will not alter performance

Comparing c/12-04-fix_semantic_add_ts_error_code_to_constructor_implementation_missing_diagnostic (82848f3) with main (cfdfe7d)

Summary

✅ 42 untouched
⏩ 3 skipped1

Footnotes

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

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