TypeScript/tests/baselines/reference/libTypeScriptOverrideSimple.js
Orta Therox b2f9432c40
Support resolving @typescript/[lib] in node modules (#45771)
* Support resolving @typescript/x for libs

* Baselines

* Tightens up the PR

* Fix the build

* Add cache

* Better naming

* Fixes the lookup path
2021-09-15 21:25:08 +01:00

19 lines
471 B
TypeScript

//// [tests/cases/compiler/libTypeScriptOverrideSimple.ts] ////
//// [index.d.ts]
interface ABC { abc: string }
//// [index.ts]
/// <reference lib="dom" />
const a: ABC = { abc: "Hello" }
// This should fail because libdom has been replaced
// by the module above ^
window.localStorage
//// [index.js]
/// <reference lib="dom" />
var a = { abc: "Hello" };
// This should fail because libdom has been replaced
// by the module above ^
window.localStorage;