2627e6f3fc
* Fix #10083 - allowSyntheticDefaultImports alters getExternalModuleMember (#10096) * Add a helper function `getOrUpdateProperty` to prevent unprotected access to Maps. * Limit type guards as assertions to incomplete types in loops * Accept new baselines * Fix linting error * [Release-2.0] Fix 9662: Visual Studio 2015 with TS2.0 gives incorrect @types path resolution errors (#9867) * Change the shape of the shim layer to support getAutomaticTypeDirectives * Change the key for looking up automatic type-directives * Update baselines from change look-up name of type-directives * Add @currentDirectory into the test * Update baselines * Fix linting error * Address PR: fix spelling mistake * Instead of return path of the type directive names just return type directive names * Remove unused reference files: these tests produce erros so they will not produce these files (#9233) * Don't allow properties inherited from Object to be automatically included in TSX attributes * Port PR #10016 to Master (#10100) * Treat namespaceExportDeclaration as declaration * Update baselines * wip - add tests * Add tests * Show "export namespace" for quick-info * Update baselines from merging
35 lines
1,020 B
Plaintext
35 lines
1,020 B
Plaintext
=== tests/cases/conformance/externalModules/a.ts ===
|
|
/// <reference path="foo.d.ts" />
|
|
Foo.fn();
|
|
>Foo.fn : Symbol(Foo.fn, Decl(foo.d.ts, 1, 21))
|
|
>Foo : Symbol(Foo, Decl(foo.d.ts, 3, 38))
|
|
>fn : Symbol(Foo.fn, Decl(foo.d.ts, 1, 21))
|
|
|
|
let x: Foo.Thing;
|
|
>x : Symbol(x, Decl(a.ts, 2, 3))
|
|
>Foo : Symbol(Foo, Decl(foo.d.ts, 3, 38))
|
|
>Thing : Symbol(Foo.Thing, Decl(foo.d.ts, 2, 27))
|
|
|
|
let y: number = x.n;
|
|
>y : Symbol(y, Decl(a.ts, 3, 3))
|
|
>x.n : Symbol(Foo.Thing.n, Decl(foo.d.ts, 3, 24))
|
|
>x : Symbol(x, Decl(a.ts, 2, 3))
|
|
>n : Symbol(Foo.Thing.n, Decl(foo.d.ts, 3, 24))
|
|
|
|
=== tests/cases/conformance/externalModules/foo.d.ts ===
|
|
|
|
export var x: number;
|
|
>x : Symbol(x, Decl(foo.d.ts, 1, 10))
|
|
|
|
export function fn(): void;
|
|
>fn : Symbol(fn, Decl(foo.d.ts, 1, 21))
|
|
|
|
export interface Thing { n: typeof x }
|
|
>Thing : Symbol(Thing, Decl(foo.d.ts, 2, 27))
|
|
>n : Symbol(Thing.n, Decl(foo.d.ts, 3, 24))
|
|
>x : Symbol(x, Decl(foo.d.ts, 1, 10))
|
|
|
|
export as namespace Foo;
|
|
>Foo : Symbol(Foo, Decl(foo.d.ts, 3, 38))
|
|
|