TypeScript/tests/baselines/reference/importEqualsError45874.js
Andrew Branch 3519af0bab
Fix crash pulling on global types before they're initialized (#46471)
* Add failing test

* Dumb fix

* Compute error message info more lazily

* One more laziness
2021-10-25 10:53:41 -07:00

22 lines
404 B
TypeScript

//// [tests/cases/compiler/importEqualsError45874.ts] ////
//// [globals.ts]
namespace globals {
export type Foo = {};
export const Bar = {};
}
import Foo = globals.toString.Blah;
//// [index.ts]
const Foo = {};
//// [globals.js]
var globals;
(function (globals) {
globals.Bar = {};
})(globals || (globals = {}));
var Foo = globals.toString.Blah;
//// [index.js]
var Foo = {};