TypeScript/tests/baselines/reference/importEquals2.symbols
Andrew Branch 2fac535158
Fix type-only imports in interface 'extends' and import=/export= (#36496)
* Handle when files get checked in different orders

* Fix interface extends clause

* Fix import= something type only from a module

* Revert apparently unnecessary addition

* Revert "Revert apparently unnecessary addition"

This reverts commit 7444b0b72e.

* Disallow `import = a.b.c` on anything with type-only imports

* Safety first

* Add test for TS Server single-file open

* Add big comment

* Extract error reporting function for import aliases

* Delete blank line

* Un-export, comment, and colocate some utils

* Combine 3 type-only marking function calls into one

* Add more export default tests
2020-01-29 15:00:17 -08:00

22 lines
382 B
Plaintext

=== /c.ts ===
import a = require('./b');
>a : Symbol(a, Decl(c.ts, 0, 0))
new a.A(); // Error
>a : Symbol(a, Decl(c.ts, 0, 0))
=== /a.ts ===
class A {}
>A : Symbol(A, Decl(a.ts, 0, 0))
export type { A }
>A : Symbol(A, Decl(a.ts, 1, 13))
=== /b.ts ===
import * as a from './a';
>a : Symbol(a, Decl(b.ts, 0, 6))
export = a;
>a : Symbol(a, Decl(b.ts, 0, 6))