File: specializedInheritedConstructors1.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 (55 lines) | stat: -rw-r--r-- 2,750 bytes parent folder | download | duplicates (7)
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
=== tests/cases/compiler/specializedInheritedConstructors1.ts ===
interface ViewOptions<TModel> {
>ViewOptions : Symbol(ViewOptions, Decl(specializedInheritedConstructors1.ts, 0, 0))
>TModel : Symbol(TModel, Decl(specializedInheritedConstructors1.ts, 0, 22))

    model: TModel;
>model : Symbol(ViewOptions.model, Decl(specializedInheritedConstructors1.ts, 0, 31))
>TModel : Symbol(TModel, Decl(specializedInheritedConstructors1.ts, 0, 22))
}

class View<TModel> {
>View : Symbol(View, Decl(specializedInheritedConstructors1.ts, 2, 1))
>TModel : Symbol(TModel, Decl(specializedInheritedConstructors1.ts, 4, 11))

    constructor(options: ViewOptions<TModel>) { }
>options : Symbol(options, Decl(specializedInheritedConstructors1.ts, 5, 16))
>ViewOptions : Symbol(ViewOptions, Decl(specializedInheritedConstructors1.ts, 0, 0))
>TModel : Symbol(TModel, Decl(specializedInheritedConstructors1.ts, 4, 11))

    model: TModel;
>model : Symbol(View.model, Decl(specializedInheritedConstructors1.ts, 5, 49))
>TModel : Symbol(TModel, Decl(specializedInheritedConstructors1.ts, 4, 11))
}

class Model { }
>Model : Symbol(Model, Decl(specializedInheritedConstructors1.ts, 7, 1))

class MyView extends View<Model> { }
>MyView : Symbol(MyView, Decl(specializedInheritedConstructors1.ts, 9, 15))
>View : Symbol(View, Decl(specializedInheritedConstructors1.ts, 2, 1))
>Model : Symbol(Model, Decl(specializedInheritedConstructors1.ts, 7, 1))

var m: ViewOptions<Model> = { model: new Model() };
>m : Symbol(m, Decl(specializedInheritedConstructors1.ts, 12, 3))
>ViewOptions : Symbol(ViewOptions, Decl(specializedInheritedConstructors1.ts, 0, 0))
>Model : Symbol(Model, Decl(specializedInheritedConstructors1.ts, 7, 1))
>model : Symbol(model, Decl(specializedInheritedConstructors1.ts, 12, 29))
>Model : Symbol(Model, Decl(specializedInheritedConstructors1.ts, 7, 1))

var aView = new View({ model: new Model() }); 
>aView : Symbol(aView, Decl(specializedInheritedConstructors1.ts, 13, 3))
>View : Symbol(View, Decl(specializedInheritedConstructors1.ts, 2, 1))
>model : Symbol(model, Decl(specializedInheritedConstructors1.ts, 13, 22))
>Model : Symbol(Model, Decl(specializedInheritedConstructors1.ts, 7, 1))

var aView2 = new View(m); 
>aView2 : Symbol(aView2, Decl(specializedInheritedConstructors1.ts, 14, 3))
>View : Symbol(View, Decl(specializedInheritedConstructors1.ts, 2, 1))
>m : Symbol(m, Decl(specializedInheritedConstructors1.ts, 12, 3))

var myView = new MyView(m); // was error
>myView : Symbol(myView, Decl(specializedInheritedConstructors1.ts, 15, 3))
>MyView : Symbol(MyView, Decl(specializedInheritedConstructors1.ts, 9, 15))
>m : Symbol(m, Decl(specializedInheritedConstructors1.ts, 12, 3))