Skip to content

fix(semantic): allow arguments/eval as binding identifier names and identifier reference names in .d.ts#17910

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-12-fix_semantic_allow_arguments_eval_as_binding_identifier_names_and_identifier_reference_names_in_.d.ts
Jan 12, 2026
Merged

fix(semantic): allow arguments/eval as binding identifier names and identifier reference names in .d.ts#17910
graphite-app[bot] merged 1 commit intomainfrom
01-12-fix_semantic_allow_arguments_eval_as_binding_identifier_names_and_identifier_reference_names_in_.d.ts

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Jan 12, 2026

Fixes: #17776

@Dunqing Dunqing marked this pull request as ready for review January 12, 2026 04:45
Copilot AI review requested due to automatic review settings January 12, 2026 04:45
@github-actions github-actions bot added A-semantic Area - Semantic C-bug Category - Bug labels Jan 12, 2026
Copy link
Member Author

Dunqing commented Jan 12, 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.

@Dunqing Dunqing changed the title fix(semantic): allow arguments/eval as binding identifier names and identifier reference names in .d.ts fix(semantic): allow arguments/eval as binding identifier names and identifier reference names in .d.ts Jan 12, 2026
@Dunqing Dunqing requested a review from camc314 January 12, 2026 04:45
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 fixes semantic checking to allow arguments and eval as binding identifier names and identifier reference names in TypeScript definition files (.d.ts). The fix simplifies the existing logic by adding early returns for .d.ts files, removing the need for complex AST node type checking.

Changes:

  • Added early return in check_binding_identifier to skip validation for .d.ts files
  • Added early return in check_identifier_reference to skip validation for .d.ts files
  • Removed complex special-case logic for TypeScript-specific AST node types
  • Added test cases demonstrating usage of arguments and eval in various contexts within .d.ts files

Reviewed changes

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

File Description
tasks/coverage/misc/pass/arguments-eval.d.ts Added test cases for using arguments and eval as function names, parameters, and in type expressions within a declare global block
crates/oxc_semantic/src/checker/javascript.rs Added early returns for .d.ts files in identifier validation functions and removed complex TypeScript-specific AST node checking logic

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

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 12, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing 01-12-fix_semantic_allow_arguments_eval_as_binding_identifier_names_and_identifier_reference_names_in_.d.ts (6be64d9) with main (f1fb048)

Summary

✅ 42 untouched benchmarks
⏩ 3 skipped benchmarks1

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.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 12, 2026
Copy link
Contributor

camc314 commented Jan 12, 2026

Merge activity

…nd identifier reference names in `.d.ts` (#17910)

Fixes: #17776
@graphite-app graphite-app bot force-pushed the 01-12-fix_semantic_allow_arguments_eval_as_binding_identifier_names_and_identifier_reference_names_in_.d.ts branch from 6be64d9 to 4d9582d Compare January 12, 2026 10:03
@graphite-app graphite-app bot merged commit 4d9582d into main Jan 12, 2026
20 checks passed
@graphite-app graphite-app bot deleted the 01-12-fix_semantic_allow_arguments_eval_as_binding_identifier_names_and_identifier_reference_names_in_.d.ts branch January 12, 2026 10:09
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 12, 2026
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.

parser: .d.ts should allow a function argument named arguments?

3 participants