Skip to content

fix(isolated-declarations): align readonly class array initializer diagnostics with tsc#19218

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/02-10-refactor_isolated-declarations_remove_dead_branch
Feb 10, 2026
Merged

fix(isolated-declarations): align readonly class array initializer diagnostics with tsc#19218
graphite-app[bot] merged 1 commit intomainfrom
c/02-10-refactor_isolated-declarations_remove_dead_branch

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Feb 10, 2026

No description provided.

@github-actions github-actions bot added the A-isolated-declarations Isolated Declarations label Feb 10, 2026
Copy link
Contributor Author

camc314 commented Feb 10, 2026


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.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Feb 10, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 10, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing c/02-10-refactor_isolated-declarations_remove_dead_branch (4ac5780) with main (b4f7e7f)1

Summary

✅ 47 untouched benchmarks
⏩ 3 skipped benchmarks2

Footnotes

  1. No successful run was found on main (1b2f354) during the generation of this report, so b4f7e7f 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.

@camc314 camc314 force-pushed the c/02-10-refactor_isolated-declarations_remove_dead_branch branch 2 times, most recently from 26d32f1 to af82941 Compare February 10, 2026 12:55
@camc314 camc314 changed the title refactor(isolated-declarations): remove dead branch fix(isolated-declarations): align readonly class array initializer diagnostics with tsc Feb 10, 2026
@camc314 camc314 marked this pull request as ready for review February 10, 2026 12:55
@camc314 camc314 requested a review from Dunqing as a code owner February 10, 2026 12:56
Copilot AI review requested due to automatic review settings February 10, 2026 12:56
@github-actions github-actions bot added the C-bug Category - Bug label Feb 10, 2026
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

Aligns oxc_isolated_declarations diagnostics for readonly class properties initialized with array literals to match tsc behavior under --isolatedDeclarations, and updates the test suite accordingly.

Changes:

  • Emit TS9017 (“Only const arrays can be inferred…”) for readonly class properties initialized with non-const array literals, producing unknown in the generated .d.ts.
  • Add/update fixtures covering a broad set of readonly array initializer variations.
  • Regenerate/update snapshots to reflect the new .d.ts output and diagnostics.

Reviewed changes

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

Show a summary per file
File Description
crates/oxc_isolated_declarations/src/class.rs Adds a targeted readonly-class-property array-literal check to emit TS9017 + unknown.
crates/oxc_isolated_declarations/tests/fixtures/readonly-class-property-initializer.ts Extends fixture coverage to readonly array initializer cases.
crates/oxc_isolated_declarations/tests/fixtures/readonly-class-property-variations.ts New fixture covering many readonly array initializer patterns.
crates/oxc_isolated_declarations/tests/snapshots/readonly-class-property-initializer.snap Updates expected .d.ts + TS9017 diagnostics for new fixture cases.
crates/oxc_isolated_declarations/tests/snapshots/readonly-class-property-variations.snap New snapshot for the new variations fixture.

@camc314 camc314 force-pushed the c/02-10-refactor_isolated-declarations_remove_dead_branch branch from af82941 to 4ac5780 Compare February 10, 2026 13:18
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Feb 10, 2026
Copy link
Member

Dunqing commented Feb 10, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the c/02-10-refactor_isolated-declarations_remove_dead_branch branch from 4ac5780 to 3e0e5ba Compare February 10, 2026 14:51
@graphite-app graphite-app bot merged commit 3e0e5ba into main Feb 10, 2026
21 checks passed
@graphite-app graphite-app bot deleted the c/02-10-refactor_isolated-declarations_remove_dead_branch branch February 10, 2026 14:58
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 10, 2026
owjs3901 pushed a commit to owjs3901/oxc that referenced this pull request Feb 11, 2026
camc314 pushed a commit that referenced this pull request Feb 16, 2026
### 🚀 Features

- 429d876 semantic: Assign ast node ids during semantic build (#19263)
(Boshen)
- ebb80b3 ast: Add `node_id` field to all AST struct nodes (#18138)
(Boshen)

### 🐛 Bug Fixes

- bfb15a3 semantic: Make multi_index_vec clone panic-safe (#19299)
(Boshen)
- 41c50a5 transformer: Ignore invalid JSX pragma identifiers (#19296)
(Boshen)
- deed3d8 transformer: Remove unnecessary trailing expression in object
rest spread assignment (#19259) (Boshen)
- 5bdaacc transformer: Propagate source spans for sourcemap correctness
(#19258) (Boshen)
- 3e0e5ba isolated-declarations: Align readonly class array initializer
diagnostics with tsc (#19218) (camc314)

### ⚡ Performance

- c169c77 syntax: Optimize `is_identifier_name_patched` (#19386)
(sapphi-red)
- aa1e1a8 allocator: Inline BitSet accessors (#19331) (Boshen)
- 5b90d46 semantic: Improve SoA with multi index vec (#19138) (Boshen)
- 99ce2a6 isolated_declarations: Mark all diagnostic functions as
`#[cold]` (#19279) (camc314)
- dd0220f transformer: Remove TS-only nodes earlier in
`enter_statements` (#19166) (Dunqing)
- e5baf60 isolated-declarations: Replace hash collections with
index-based Vec (#19221) (Dunqing)

### 📚 Documentation

- 569aa61 rust: Add missing rustdocs and remove missing_docs lint attrs
(#19306) (Boshen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-isolated-declarations Isolated Declarations C-bug Category - Bug C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants