-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
358ab6e
commit 9fed7d1
Showing
2 changed files
with
54 additions
and
0 deletions.
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
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,23 @@ | ||
typeNamedUndefined.ts(3,17): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. | ||
typeNamedUndefined.ts(13,13): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. | ||
|
||
|
||
==== typeNamedUndefined.ts (2 errors) ==== | ||
export namespace ns { | ||
const s = Symbol(); | ||
export type undefined = typeof s; | ||
~~~~~~~~~ | ||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. | ||
export function x(p: undefined): undefined { // global undefined | ||
return p; | ||
} | ||
} | ||
|
||
export function x(p: ns.undefined) { // undefined from the namespace | ||
return p; | ||
} | ||
|
||
export type undefined = ""; | ||
~~~~~~~~~ | ||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. | ||
|