-
Notifications
You must be signed in to change notification settings - Fork 12.2k
/
contextualTypeFunctionObjectPropertyIntersection.symbols
242 lines (188 loc) · 12.7 KB
/
contextualTypeFunctionObjectPropertyIntersection.symbols
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
//// [tests/cases/compiler/contextualTypeFunctionObjectPropertyIntersection.ts] ////
=== contextualTypeFunctionObjectPropertyIntersection.ts ===
// repro from #48812
type Action<TEvent extends { type: string }> = (ev: TEvent) => void;
>Action : Symbol(Action, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 0, 0))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 2, 12))
>type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 2, 28))
>ev : Symbol(ev, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 2, 48))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 2, 12))
interface MachineConfig<TEvent extends { type: string }> {
>MachineConfig : Symbol(MachineConfig, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 2, 68))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 24))
>type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 40))
schema: {
>schema : Symbol(MachineConfig.schema, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 58))
events: TEvent;
>events : Symbol(events, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 5, 11))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 24))
};
on?: {
>on : Symbol(MachineConfig.on, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 7, 4))
[K in TEvent["type"]]?: Action<TEvent extends { type: K } ? TEvent : never>;
>K : Symbol(K, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 9, 5))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 24))
>Action : Symbol(Action, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 0, 0))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 24))
>type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 9, 51))
>K : Symbol(K, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 9, 5))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 24))
} & {
"*"?: Action<TEvent>;
>"*" : Symbol("*", Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 10, 7))
>Action : Symbol(Action, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 0, 0))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 4, 24))
};
}
declare function createMachine<TEvent extends { type: string }>(
>createMachine : Symbol(createMachine, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 13, 1))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 15, 31))
>type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 15, 47))
config: MachineConfig<TEvent>
>config : Symbol(config, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 15, 64))
>MachineConfig : Symbol(MachineConfig, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 2, 68))
>TEvent : Symbol(TEvent, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 15, 31))
): void;
createMachine({
>createMachine : Symbol(createMachine, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 13, 1))
schema: {
>schema : Symbol(schema, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 19, 15))
events: {} as { type: "FOO" } | { type: "BAR" },
>events : Symbol(events, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 20, 11))
>type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 21, 19))
>type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 21, 37))
},
on: {
>on : Symbol(on, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 22, 4))
FOO: (ev) => {
>FOO : Symbol(FOO, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 23, 7))
>ev : Symbol(ev, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 24, 10))
ev.type; // should be 'FOO'
>ev.type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 21, 19))
>ev : Symbol(ev, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 24, 10))
>type : Symbol(type, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 21, 19))
},
},
});
// repro from #49307#issuecomment-1143103607
declare function createSlice<T>(
>createSlice : Symbol(createSlice, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 28, 3), Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 63, 2))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 32, 29))
reducers: { [K: string]: (state: string) => void } & {
>reducers : Symbol(reducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 32, 32))
>K : Symbol(K, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 33, 15))
>state : Symbol(state, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 33, 28))
[K in keyof T]: object;
>K : Symbol(K, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 34, 5))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 32, 29))
}
): void;
createSlice({
>createSlice : Symbol(createSlice, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 28, 3), Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 63, 2))
f(a) {},
>f : Symbol(f, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 38, 13))
>a : Symbol(a, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 39, 4))
});
// repro from #49307#issuecomment-1196014488
type Validate<T> = T & { [K in keyof T]: object }
>Validate : Symbol(Validate, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 40, 3))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 44, 14))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 44, 14))
>K : Symbol(K, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 44, 26))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 44, 14))
declare function f<S, T extends Record<string, (state: S) => any>>(s: S, x: Validate<T>): void;
>f : Symbol(f, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 44, 49))
>S : Symbol(S, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 19))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 21))
>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
>state : Symbol(state, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 48))
>S : Symbol(S, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 19))
>s : Symbol(s, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 67))
>S : Symbol(S, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 19))
>x : Symbol(x, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 72))
>Validate : Symbol(Validate, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 40, 3))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 45, 21))
f(0, {
>f : Symbol(f, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 44, 49))
foo: s => s + 1,
>foo : Symbol(foo, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 47, 6))
>s : Symbol(s, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 48, 6))
>s : Symbol(s, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 48, 6))
})
// repro from 49307#issuecomment-1195858950
type SliceCaseReducers<State> = Record<string, (state: State) => State | void>;
>SliceCaseReducers : Symbol(SliceCaseReducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 49, 2))
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 53, 23))
>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
>state : Symbol(state, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 53, 48))
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 53, 23))
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 53, 23))
type ValidateSliceCaseReducers<S, ACR extends SliceCaseReducers<S>> = ACR & {
>ValidateSliceCaseReducers : Symbol(ValidateSliceCaseReducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 53, 79))
>S : Symbol(S, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 55, 31))
>ACR : Symbol(ACR, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 55, 33))
>SliceCaseReducers : Symbol(SliceCaseReducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 49, 2))
>S : Symbol(S, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 55, 31))
>ACR : Symbol(ACR, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 55, 33))
[T in keyof ACR]: ACR[T] extends {
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 56, 3))
>ACR : Symbol(ACR, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 55, 33))
>ACR : Symbol(ACR, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 55, 33))
>T : Symbol(T, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 56, 3))
reducer(s: S, action?: infer A): any;
>reducer : Symbol(reducer, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 56, 36))
>s : Symbol(s, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 57, 12))
>S : Symbol(S, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 55, 31))
>action : Symbol(action, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 57, 17))
>A : Symbol(A, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 57, 32))
}
? {
prepare(...a: never[]): Omit<A, "type">;
>prepare : Symbol(prepare, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 59, 7))
>a : Symbol(a, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 60, 16))
>Omit : Symbol(Omit, Decl(lib.es5.d.ts, --, --))
>A : Symbol(A, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 57, 32))
}
: {};
};
declare function createSlice<
>createSlice : Symbol(createSlice, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 28, 3), Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 63, 2))
State,
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 65, 29))
CaseReducers extends SliceCaseReducers<State>
>CaseReducers : Symbol(CaseReducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 66, 8))
>SliceCaseReducers : Symbol(SliceCaseReducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 49, 2))
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 65, 29))
>(options: {
>options : Symbol(options, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 68, 2))
initialState: State | (() => State);
>initialState : Symbol(initialState, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 68, 12))
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 65, 29))
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 65, 29))
reducers: ValidateSliceCaseReducers<State, CaseReducers>;
>reducers : Symbol(reducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 69, 38))
>ValidateSliceCaseReducers : Symbol(ValidateSliceCaseReducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 53, 79))
>State : Symbol(State, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 65, 29))
>CaseReducers : Symbol(CaseReducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 66, 8))
}): void;
export const clientSlice = createSlice({
>clientSlice : Symbol(clientSlice, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 73, 12))
>createSlice : Symbol(createSlice, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 28, 3), Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 63, 2))
initialState: {
>initialState : Symbol(initialState, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 73, 40))
username: "",
>username : Symbol(username, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 74, 17))
isLoggedIn: false,
>isLoggedIn : Symbol(isLoggedIn, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 75, 17))
userId: "",
>userId : Symbol(userId, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 76, 22))
avatar: "",
>avatar : Symbol(avatar, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 77, 15))
},
reducers: {
>reducers : Symbol(reducers, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 79, 4))
onClientUserChanged(state) {},
>onClientUserChanged : Symbol(onClientUserChanged, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 80, 13))
>state : Symbol(state, Decl(contextualTypeFunctionObjectPropertyIntersection.ts, 81, 24))
},
});