@@ -90,3 +90,43 @@ const generic: {
90
90
91
91
};
92
92
93
+ const thisType = {
94
+ >thisType : Symbol(thisType, Decl(contextualTypeInObjectProperty.ts, 32, 5))
95
+
96
+ [getC()]: function() {
97
+ >[getC()] : Symbol([getC()], Decl(contextualTypeInObjectProperty.ts, 32, 18))
98
+ >getC : Symbol(getC, Decl(contextualTypeInObjectProperty.ts, 6, 5))
99
+
100
+ this.c();
101
+ >this.c : Symbol([getC()], Decl(contextualTypeInObjectProperty.ts, 32, 18))
102
+ >this : Symbol(thisType, Decl(contextualTypeInObjectProperty.ts, 32, 16))
103
+ >c : Symbol([getC()], Decl(contextualTypeInObjectProperty.ts, 32, 18))
104
+ }
105
+ };
106
+
107
+
108
+ declare function f<T extends object>(data: T, handlers: { [P in keyof T]: (value: T[P], prop: P) => void; }): void;
109
+ >f : Symbol(f, Decl(contextualTypeInObjectProperty.ts, 36, 2))
110
+ >T : Symbol(T, Decl(contextualTypeInObjectProperty.ts, 39, 19))
111
+ >data : Symbol(data, Decl(contextualTypeInObjectProperty.ts, 39, 37))
112
+ >T : Symbol(T, Decl(contextualTypeInObjectProperty.ts, 39, 19))
113
+ >handlers : Symbol(handlers, Decl(contextualTypeInObjectProperty.ts, 39, 45))
114
+ >P : Symbol(P, Decl(contextualTypeInObjectProperty.ts, 39, 59))
115
+ >T : Symbol(T, Decl(contextualTypeInObjectProperty.ts, 39, 19))
116
+ >value : Symbol(value, Decl(contextualTypeInObjectProperty.ts, 39, 75))
117
+ >T : Symbol(T, Decl(contextualTypeInObjectProperty.ts, 39, 19))
118
+ >P : Symbol(P, Decl(contextualTypeInObjectProperty.ts, 39, 59))
119
+ >prop : Symbol(prop, Decl(contextualTypeInObjectProperty.ts, 39, 87))
120
+ >P : Symbol(P, Decl(contextualTypeInObjectProperty.ts, 39, 59))
121
+
122
+ f({ data: 0 }, {
123
+ >f : Symbol(f, Decl(contextualTypeInObjectProperty.ts, 36, 2))
124
+ >data : Symbol(data, Decl(contextualTypeInObjectProperty.ts, 40, 3))
125
+
126
+ [(() => 'data' as const)()](value, key) {
127
+ >[(() => 'data' as const)()] : Symbol([(() => 'data' as const)()], Decl(contextualTypeInObjectProperty.ts, 40, 16))
128
+ >value : Symbol(value, Decl(contextualTypeInObjectProperty.ts, 41, 30))
129
+ >key : Symbol(key, Decl(contextualTypeInObjectProperty.ts, 41, 36))
130
+
131
+ },
132
+ });
0 commit comments