98 lines
No EOL
2.6 KiB
Text
98 lines
No EOL
2.6 KiB
Text
tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(1,15): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
|
tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
|
|
|
|
|
==== tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts (2 errors) ====
|
|
export module require {
|
|
~~~~~~~
|
|
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
export function foo(): require.I {
|
|
return null;
|
|
}
|
|
export module exports {
|
|
~~~~~~~
|
|
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
export function foo2(): exports.I {
|
|
return null;
|
|
}
|
|
module m1 {
|
|
module require {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
module exports {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
}
|
|
module m2 {
|
|
export module require {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
export module exports {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
}
|
|
|
|
==== tests/cases/compiler/collisionExportsRequireAndModule_globalFile.ts (0 errors) ====
|
|
module require {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
module exports {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
module m3 {
|
|
module require {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
module exports {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
}
|
|
module m4 {
|
|
export module require {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
export module exports {
|
|
export interface I {
|
|
}
|
|
export class C {
|
|
}
|
|
}
|
|
}
|
|
|