=== tests/cases/compiler/consumer.ts === import x = require('./foo'); >x : typeof x, Symbol(x, Decl(consumer.ts, 0, 0)) x.Y // .ts should be picked >x.Y : number, Symbol(x.Y, Decl(foo.ts, 1, 14)) >x : typeof x, Symbol(x, Decl(consumer.ts, 0, 0)) >Y : number, Symbol(x.Y, Decl(foo.ts, 1, 14)) === tests/cases/compiler/foo.ts === module M2 { >M2 : typeof M2, Symbol(M2, Decl(foo.ts, 0, 0)) export var Y = 1; >Y : number, Symbol(Y, Decl(foo.ts, 1, 14)) >1 : number } export = M2 >M2 : typeof M2, Symbol(M2, Decl(foo.ts, 0, 0))