33 lines
No EOL
1.3 KiB
Text
33 lines
No EOL
1.3 KiB
Text
tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(3,5): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
|
tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
|
|
|
|
|
==== tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts (2 errors) ====
|
|
export function foo() {
|
|
}
|
|
var exports = 1;
|
|
~~~~~~~
|
|
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
|
var require = "require";
|
|
~~~~~~~
|
|
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
|
module m1 {
|
|
var exports = 0;
|
|
var require = "require";
|
|
}
|
|
module m2 {
|
|
export var exports = 0;
|
|
export var require = "require";
|
|
}
|
|
|
|
==== tests/cases/compiler/collisionExportsRequireAndVar_globalFile.ts (0 errors) ====
|
|
var exports = 0;
|
|
var require = "require";
|
|
module m3 {
|
|
var exports = 0;
|
|
var require = "require";
|
|
}
|
|
module m4 {
|
|
export var exports = 0;
|
|
export var require = "require";
|
|
} |