File: typesOnlyExternalModuleStillHasInstance.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (39 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
=== tests/cases/conformance/externalModules/foo_1.ts ===
import foo0 = require('./foo_0');
>foo0 : Symbol(foo0, Decl(foo_1.ts, 0, 0))

// Per 11.2.3, foo_0 should still be "instantiated", albeit with no members

var x: typeof foo0 = {};
>x : Symbol(x, Decl(foo_1.ts, 3, 3))
>foo0 : Symbol(foo0, Decl(foo_1.ts, 0, 0))

var y: {M2: Object} = foo0;
>y : Symbol(y, Decl(foo_1.ts, 4, 3))
>M2 : Symbol(M2, Decl(foo_1.ts, 4, 8))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>foo0 : Symbol(foo0, Decl(foo_1.ts, 0, 0))

=== tests/cases/conformance/externalModules/foo_0.ts ===
export interface Person {
>Person : Symbol(Person, Decl(foo_0.ts, 0, 0))

	name: string;
>name : Symbol(Person.name, Decl(foo_0.ts, 0, 25))

	age: number;
>age : Symbol(Person.age, Decl(foo_0.ts, 1, 14))
}

export module M2 {
>M2 : Symbol(M2, Decl(foo_0.ts, 3, 1))

	export interface I2 {
>I2 : Symbol(I2, Decl(foo_0.ts, 5, 18))

		x: Person;
>x : Symbol(I2.x, Decl(foo_0.ts, 6, 22))
>Person : Symbol(Person, Decl(foo_0.ts, 0, 0))
	}
}