forked from microsoft/TypeScript
/
importAliasModuleExports.types
80 lines (70 loc) · 1.73 KB
/
importAliasModuleExports.types
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
=== tests/cases/conformance/salsa/mod1.js ===
class Alias {
>Alias : Alias
bar() { return 1 }
>bar : () => number
>1 : 1
}
module.exports = Alias;
>module.exports = Alias : typeof Alias
>module.exports : typeof Alias
>module : { "\"tests/cases/conformance/salsa/mod1\"": typeof Alias; }
>exports : typeof Alias
>Alias : typeof Alias
=== tests/cases/conformance/salsa/main.js ===
import A from './mod1'
>A : typeof A
A.prototype.foo = 0
>A.prototype.foo = 0 : 0
>A.prototype.foo : any
>A.prototype : A
>A : typeof A
>prototype : A
>foo : any
>0 : 0
A.prototype.func = function() { this._func = 0; }
>A.prototype.func = function() { this._func = 0; } : () => void
>A.prototype.func : any
>A.prototype : A
>A : typeof A
>prototype : A
>func : any
>function() { this._func = 0; } : () => void
>this._func = 0 : 0
>this._func : any
>this : A
>_func : any
>0 : 0
Object.defineProperty(A.prototype, "def", { value: 0 });
>Object.defineProperty(A.prototype, "def", { value: 0 }) : any
>Object.defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>Object : ObjectConstructor
>defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>A.prototype : A
>A : typeof A
>prototype : A
>"def" : "def"
>{ value: 0 } : { value: number; }
>value : number
>0 : 0
new A().bar
>new A().bar : () => number
>new A() : A
>A : typeof A
>bar : () => number
new A().foo
>new A().foo : any
>new A() : A
>A : typeof A
>foo : any
new A().func()
>new A().func() : any
>new A().func : any
>new A() : A
>A : typeof A
>func : any
new A().def
>new A().def : any
>new A() : A
>A : typeof A
>def : any