forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(57386): Invalid use of 'eval' when defining a namespaced eval fun…
…ction (microsoft#57391)
- Loading branch information
1 parent
5d17aa7
commit 8ada4ef
Showing
4 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/baselines/reference/evalOrArgumentsInDeclarationFunctions.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//// [tests/cases/compiler/evalOrArgumentsInDeclarationFunctions.ts] //// | ||
|
||
=== /a.d.ts === | ||
declare global { | ||
>global : Symbol(global, Decl(a.d.ts, 0, 0)) | ||
|
||
export namespace ns { | ||
>ns : Symbol(ns, Decl(a.d.ts, 0, 16)) | ||
|
||
export function eval(): void; | ||
>eval : Symbol(eval, Decl(a.d.ts, 1, 25)) | ||
|
||
export function arguments(): void; | ||
>arguments : Symbol(arguments, Decl(a.d.ts, 2, 37)) | ||
} | ||
} | ||
|
||
declare function eval(): void; | ||
>eval : Symbol(eval, Decl(a.d.ts, 5, 1)) | ||
|
||
declare function arguments(): void; | ||
>arguments : Symbol(arguments, Decl(a.d.ts, 7, 30)) | ||
|
||
export {} | ||
|
25 changes: 25 additions & 0 deletions
25
tests/baselines/reference/evalOrArgumentsInDeclarationFunctions.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//// [tests/cases/compiler/evalOrArgumentsInDeclarationFunctions.ts] //// | ||
|
||
=== /a.d.ts === | ||
declare global { | ||
>global : typeof global | ||
|
||
export namespace ns { | ||
>ns : typeof ns | ||
|
||
export function eval(): void; | ||
>eval : () => void | ||
|
||
export function arguments(): void; | ||
>arguments : () => void | ||
} | ||
} | ||
|
||
declare function eval(): void; | ||
>eval : () => void | ||
|
||
declare function arguments(): void; | ||
>arguments : () => void | ||
|
||
export {} | ||
|
12 changes: 12 additions & 0 deletions
12
tests/cases/compiler/evalOrArgumentsInDeclarationFunctions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @filename: /a.d.ts | ||
declare global { | ||
export namespace ns { | ||
export function eval(): void; | ||
export function arguments(): void; | ||
} | ||
} | ||
|
||
declare function eval(): void; | ||
declare function arguments(): void; | ||
|
||
export {} |