mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
47ddedf011
## Summary - allow `eval` and `arguments` as direct bindings in ambient declarations - continue reporting strict-mode errors for destructured ambient bindings - add focused coverage for declared functions, classes, object patterns, and array patterns ## Why The semantic checker previously identified allowed bindings by walking to a `TSDeclareFunction`. That missed other ambient declarations, including declared class constructors and methods, and produced diagnostics for TypeScript cases that require no runtime code generation. The check now uses the existing ambient-context state and rejects only destructuring binding shapes.
8 lines
322 B
TypeScript
8 lines
322 B
TypeScript
export {};
|
|
declare var arguments: unknown;
|
|
declare const eval: unknown;
|
|
declare function objectRest({ ...arguments }: object): void;
|
|
declare function arrayRest([...eval]: unknown[]): void;
|
|
declare function objectBinding({ arguments }: { arguments: unknown }): void;
|
|
declare function arrayBinding([eval]: [unknown]): void;
|