fix(semantic): allow arguments/eval as binding identifier names and identifier reference names in .d.ts#17910
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. |
arguments/eval as binding identifier names and identifier reference names in .d.ts
There was a problem hiding this comment.
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_identifierto skip validation for.d.tsfiles - Added early return in
check_identifier_referenceto skip validation for.d.tsfiles - Removed complex special-case logic for TypeScript-specific AST node types
- Added test cases demonstrating usage of
argumentsandevalin various contexts within.d.tsfiles
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 Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
Merge activity
|
6be64d9 to
4d9582d
Compare

Fixes: #17776