tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts(13,19): error TS4025: Exported variable 'k' has or is using private name 'private1'. tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts(14,16): error TS4025: Exported variable 'l' has or is using private name 'private1'. tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts(30,20): error TS4025: Exported variable 'k3' has or is using private name 'm2'. tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts(31,16): error TS4024: Exported variable 'l3' has or is using name 'm2.public2' from private module 'm2'. ==== tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts (4 errors) ==== module m { class private1 { } export class public1 { } // Directly using names from this module var x: private1; var y = new private1(); export var k: private1; ~~~~~~~~ !!! error TS4025: Exported variable 'k' has or is using private name 'private1'. export var l = new private1(); ~ !!! error TS4025: Exported variable 'l' has or is using private name 'private1'. var x2: public1; var y2 = new public1(); export var k2: public1; export var l2 = new public1(); module m2 { export class public2 { } } var x3: m2.public2; var y3 = new m2.public2(); export var k3: m2.public2; ~~ !!! error TS4025: Exported variable 'k3' has or is using private name 'm2'. export var l3 = new m2.public2(); ~~ !!! error TS4024: Exported variable 'l3' has or is using name 'm2.public2' from private module 'm2'. }