File: vueLikeDataAndPropsInference2.symbols

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (133 lines) | stat: -rw-r--r-- 6,294 bytes parent folder | download | duplicates (4)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
=== tests/cases/compiler/vueLikeDataAndPropsInference2.ts ===
interface Instance {
>Instance : Symbol(Instance, Decl(vueLikeDataAndPropsInference2.ts, 0, 0))

    _instanceBrand: never
>_instanceBrand : Symbol(Instance._instanceBrand, Decl(vueLikeDataAndPropsInference2.ts, 0, 20))
}

type DataDef<Data, Props> = (this: Readonly<Props> & Instance) => Data
>DataDef : Symbol(DataDef, Decl(vueLikeDataAndPropsInference2.ts, 2, 1))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 4, 13))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 4, 18))
>this : Symbol(this, Decl(vueLikeDataAndPropsInference2.ts, 4, 29))
>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 4, 18))
>Instance : Symbol(Instance, Decl(vueLikeDataAndPropsInference2.ts, 0, 0))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 4, 13))

type PropsDefinition<T> = {
>PropsDefinition : Symbol(PropsDefinition, Decl(vueLikeDataAndPropsInference2.ts, 4, 70))
>T : Symbol(T, Decl(vueLikeDataAndPropsInference2.ts, 6, 21))

    [K in keyof T]: T[K]
>K : Symbol(K, Decl(vueLikeDataAndPropsInference2.ts, 7, 5))
>T : Symbol(T, Decl(vueLikeDataAndPropsInference2.ts, 6, 21))
>T : Symbol(T, Decl(vueLikeDataAndPropsInference2.ts, 6, 21))
>K : Symbol(K, Decl(vueLikeDataAndPropsInference2.ts, 7, 5))
}

interface Options<
>Options : Symbol(Options, Decl(vueLikeDataAndPropsInference2.ts, 8, 1))

    Data = object | ((this: Instance) => object),
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 10, 18))
>this : Symbol(this, Decl(vueLikeDataAndPropsInference2.ts, 11, 22))
>Instance : Symbol(Instance, Decl(vueLikeDataAndPropsInference2.ts, 0, 0))

    PropsDef = PropsDefinition<Record<string, any>>
>PropsDef : Symbol(PropsDef, Decl(vueLikeDataAndPropsInference2.ts, 11, 49))
>PropsDefinition : Symbol(PropsDefinition, Decl(vueLikeDataAndPropsInference2.ts, 4, 70))
>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))

    > {
    data?: Data
>data : Symbol(Options.data, Decl(vueLikeDataAndPropsInference2.ts, 13, 7))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 10, 18))

    props?: PropsDef
>props : Symbol(Options.props, Decl(vueLikeDataAndPropsInference2.ts, 14, 15))
>PropsDef : Symbol(PropsDef, Decl(vueLikeDataAndPropsInference2.ts, 11, 49))

    watch?: Record<string, WatchHandler<any>>
>watch : Symbol(Options.watch, Decl(vueLikeDataAndPropsInference2.ts, 15, 20))
>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
>WatchHandler : Symbol(WatchHandler, Decl(vueLikeDataAndPropsInference2.ts, 17, 1))
}

type WatchHandler<T> = (val: T, oldVal: T) => void;
>WatchHandler : Symbol(WatchHandler, Decl(vueLikeDataAndPropsInference2.ts, 17, 1))
>T : Symbol(T, Decl(vueLikeDataAndPropsInference2.ts, 19, 18))
>val : Symbol(val, Decl(vueLikeDataAndPropsInference2.ts, 19, 24))
>T : Symbol(T, Decl(vueLikeDataAndPropsInference2.ts, 19, 18))
>oldVal : Symbol(oldVal, Decl(vueLikeDataAndPropsInference2.ts, 19, 31))
>T : Symbol(T, Decl(vueLikeDataAndPropsInference2.ts, 19, 18))

type ThisTypedOptions<Data, Props> =
>ThisTypedOptions : Symbol(ThisTypedOptions, Decl(vueLikeDataAndPropsInference2.ts, 19, 51))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 21, 22))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 21, 27))

    object &
    Options<DataDef<Data, Props>, PropsDefinition<Props>> &
>Options : Symbol(Options, Decl(vueLikeDataAndPropsInference2.ts, 8, 1))
>DataDef : Symbol(DataDef, Decl(vueLikeDataAndPropsInference2.ts, 2, 1))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 21, 22))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 21, 27))
>PropsDefinition : Symbol(PropsDefinition, Decl(vueLikeDataAndPropsInference2.ts, 4, 70))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 21, 27))

    ThisType<Data & Readonly<Props> & Instance>
>ThisType : Symbol(ThisType, Decl(lib.es5.d.ts, --, --))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 21, 22))
>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 21, 27))
>Instance : Symbol(Instance, Decl(vueLikeDataAndPropsInference2.ts, 0, 0))

declare function test<Data, Props>(fn: ThisTypedOptions<Data, Props>): void;
>test : Symbol(test, Decl(vueLikeDataAndPropsInference2.ts, 24, 47), Decl(vueLikeDataAndPropsInference2.ts, 26, 76))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 26, 22))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 26, 27))
>fn : Symbol(fn, Decl(vueLikeDataAndPropsInference2.ts, 26, 35))
>ThisTypedOptions : Symbol(ThisTypedOptions, Decl(vueLikeDataAndPropsInference2.ts, 19, 51))
>Data : Symbol(Data, Decl(vueLikeDataAndPropsInference2.ts, 26, 22))
>Props : Symbol(Props, Decl(vueLikeDataAndPropsInference2.ts, 26, 27))

declare function test(fn: Options): void;
>test : Symbol(test, Decl(vueLikeDataAndPropsInference2.ts, 24, 47), Decl(vueLikeDataAndPropsInference2.ts, 26, 76))
>fn : Symbol(fn, Decl(vueLikeDataAndPropsInference2.ts, 27, 22))
>Options : Symbol(Options, Decl(vueLikeDataAndPropsInference2.ts, 8, 1))

test({
>test : Symbol(test, Decl(vueLikeDataAndPropsInference2.ts, 24, 47), Decl(vueLikeDataAndPropsInference2.ts, 26, 76))

    props: {
>props : Symbol(props, Decl(vueLikeDataAndPropsInference2.ts, 29, 6))

        foo: ''
>foo : Symbol(foo, Decl(vueLikeDataAndPropsInference2.ts, 30, 12))

    },

    data(): { bar: boolean } {
>data : Symbol(data, Decl(vueLikeDataAndPropsInference2.ts, 32, 6))
>bar : Symbol(bar, Decl(vueLikeDataAndPropsInference2.ts, 34, 13))

        return {
            bar: true
>bar : Symbol(bar, Decl(vueLikeDataAndPropsInference2.ts, 35, 16))
        }
    },

    watch: {
>watch : Symbol(watch, Decl(vueLikeDataAndPropsInference2.ts, 38, 6))

        foo(newVal: string, oldVal: string): void {
>foo : Symbol(foo, Decl(vueLikeDataAndPropsInference2.ts, 40, 12))
>newVal : Symbol(newVal, Decl(vueLikeDataAndPropsInference2.ts, 41, 12))
>oldVal : Symbol(oldVal, Decl(vueLikeDataAndPropsInference2.ts, 41, 27))

            this.bar = false
        }
    }
})