|
| 1 | +//// [tests/cases/compiler/noSilentNeverTypeLeak1.ts] //// |
| 2 | + |
| 3 | +=== noSilentNeverTypeLeak1.ts === |
| 4 | +// https://github.com/microsoft/TypeScript/issues/62824 |
| 5 | + |
| 6 | +type Values<T> = T[keyof T]; |
| 7 | +>Values : Symbol(Values, Decl(noSilentNeverTypeLeak1.ts, 0, 0)) |
| 8 | +>T : Symbol(T, Decl(noSilentNeverTypeLeak1.ts, 2, 12)) |
| 9 | +>T : Symbol(T, Decl(noSilentNeverTypeLeak1.ts, 2, 12)) |
| 10 | +>T : Symbol(T, Decl(noSilentNeverTypeLeak1.ts, 2, 12)) |
| 11 | + |
| 12 | +type MachineContext = Record<string, any>; |
| 13 | +>MachineContext : Symbol(MachineContext, Decl(noSilentNeverTypeLeak1.ts, 2, 28)) |
| 14 | +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) |
| 15 | + |
| 16 | +interface ParameterizedObject { |
| 17 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 18 | + |
| 19 | + type: string; |
| 20 | +>type : Symbol(ParameterizedObject.type, Decl(noSilentNeverTypeLeak1.ts, 6, 31)) |
| 21 | + |
| 22 | + params?: unknown; |
| 23 | +>params : Symbol(ParameterizedObject.params, Decl(noSilentNeverTypeLeak1.ts, 7, 15)) |
| 24 | +} |
| 25 | + |
| 26 | +type ActionFunction< |
| 27 | +>ActionFunction : Symbol(ActionFunction, Decl(noSilentNeverTypeLeak1.ts, 9, 1)) |
| 28 | + |
| 29 | + TContext extends MachineContext, |
| 30 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 11, 20)) |
| 31 | +>MachineContext : Symbol(MachineContext, Decl(noSilentNeverTypeLeak1.ts, 2, 28)) |
| 32 | + |
| 33 | + TParams extends ParameterizedObject["params"] | undefined, |
| 34 | +>TParams : Symbol(TParams, Decl(noSilentNeverTypeLeak1.ts, 12, 34)) |
| 35 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 36 | + |
| 37 | + TAction extends ParameterizedObject, |
| 38 | +>TAction : Symbol(TAction, Decl(noSilentNeverTypeLeak1.ts, 13, 60)) |
| 39 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 40 | + |
| 41 | +> = { |
| 42 | + (ctx: TContext, params: TParams): void; |
| 43 | +>ctx : Symbol(ctx, Decl(noSilentNeverTypeLeak1.ts, 16, 3)) |
| 44 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 11, 20)) |
| 45 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 16, 17)) |
| 46 | +>TParams : Symbol(TParams, Decl(noSilentNeverTypeLeak1.ts, 12, 34)) |
| 47 | + |
| 48 | + _out_TAction?: TAction; |
| 49 | +>_out_TAction : Symbol(_out_TAction, Decl(noSilentNeverTypeLeak1.ts, 16, 41)) |
| 50 | +>TAction : Symbol(TAction, Decl(noSilentNeverTypeLeak1.ts, 13, 60)) |
| 51 | + |
| 52 | +}; |
| 53 | + |
| 54 | +type ToParameterizedObject< |
| 55 | +>ToParameterizedObject : Symbol(ToParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 18, 2)) |
| 56 | + |
| 57 | + TParameterizedMap extends Record< |
| 58 | +>TParameterizedMap : Symbol(TParameterizedMap, Decl(noSilentNeverTypeLeak1.ts, 20, 27)) |
| 59 | +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) |
| 60 | + |
| 61 | + string, |
| 62 | + ParameterizedObject["params"] | undefined |
| 63 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 64 | + |
| 65 | + >, |
| 66 | +> = Values<{ |
| 67 | +>Values : Symbol(Values, Decl(noSilentNeverTypeLeak1.ts, 0, 0)) |
| 68 | + |
| 69 | + [K in keyof TParameterizedMap & string]: { |
| 70 | +>K : Symbol(K, Decl(noSilentNeverTypeLeak1.ts, 26, 3)) |
| 71 | +>TParameterizedMap : Symbol(TParameterizedMap, Decl(noSilentNeverTypeLeak1.ts, 20, 27)) |
| 72 | + |
| 73 | + type: K; |
| 74 | +>type : Symbol(type, Decl(noSilentNeverTypeLeak1.ts, 26, 44)) |
| 75 | +>K : Symbol(K, Decl(noSilentNeverTypeLeak1.ts, 26, 3)) |
| 76 | + |
| 77 | + params: TParameterizedMap[K]; |
| 78 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 27, 12)) |
| 79 | +>TParameterizedMap : Symbol(TParameterizedMap, Decl(noSilentNeverTypeLeak1.ts, 20, 27)) |
| 80 | +>K : Symbol(K, Decl(noSilentNeverTypeLeak1.ts, 26, 3)) |
| 81 | + |
| 82 | + }; |
| 83 | +}>; |
| 84 | + |
| 85 | +type CollectActions< |
| 86 | +>CollectActions : Symbol(CollectActions, Decl(noSilentNeverTypeLeak1.ts, 30, 3)) |
| 87 | + |
| 88 | + TContext extends MachineContext, |
| 89 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 32, 20)) |
| 90 | +>MachineContext : Symbol(MachineContext, Decl(noSilentNeverTypeLeak1.ts, 2, 28)) |
| 91 | + |
| 92 | + TParams extends ParameterizedObject["params"] | undefined, |
| 93 | +>TParams : Symbol(TParams, Decl(noSilentNeverTypeLeak1.ts, 33, 34)) |
| 94 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 95 | + |
| 96 | +> = ( |
| 97 | + { |
| 98 | + context, |
| 99 | +>context : Symbol(context, Decl(noSilentNeverTypeLeak1.ts, 36, 3)) |
| 100 | + |
| 101 | + enqueue, |
| 102 | +>enqueue : Symbol(enqueue, Decl(noSilentNeverTypeLeak1.ts, 37, 12)) |
| 103 | + |
| 104 | + }: { |
| 105 | + context: TContext; |
| 106 | +>context : Symbol(context, Decl(noSilentNeverTypeLeak1.ts, 39, 6)) |
| 107 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 32, 20)) |
| 108 | + |
| 109 | + enqueue: (action: () => void) => void; |
| 110 | +>enqueue : Symbol(enqueue, Decl(noSilentNeverTypeLeak1.ts, 40, 22)) |
| 111 | +>action : Symbol(action, Decl(noSilentNeverTypeLeak1.ts, 41, 14)) |
| 112 | + |
| 113 | + }, |
| 114 | + params: TParams, |
| 115 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 42, 4)) |
| 116 | +>TParams : Symbol(TParams, Decl(noSilentNeverTypeLeak1.ts, 33, 34)) |
| 117 | + |
| 118 | +) => void; |
| 119 | + |
| 120 | +declare function enqueueActions< |
| 121 | +>enqueueActions : Symbol(enqueueActions, Decl(noSilentNeverTypeLeak1.ts, 44, 10)) |
| 122 | + |
| 123 | + TContext extends MachineContext, |
| 124 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 46, 32)) |
| 125 | +>MachineContext : Symbol(MachineContext, Decl(noSilentNeverTypeLeak1.ts, 2, 28)) |
| 126 | + |
| 127 | + TParams extends ParameterizedObject["params"] | undefined, |
| 128 | +>TParams : Symbol(TParams, Decl(noSilentNeverTypeLeak1.ts, 47, 34)) |
| 129 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 130 | + |
| 131 | + TAction extends ParameterizedObject = ParameterizedObject, |
| 132 | +>TAction : Symbol(TAction, Decl(noSilentNeverTypeLeak1.ts, 48, 60)) |
| 133 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 134 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 135 | + |
| 136 | +>( |
| 137 | + collect: CollectActions<TContext, TParams>, |
| 138 | +>collect : Symbol(collect, Decl(noSilentNeverTypeLeak1.ts, 50, 2)) |
| 139 | +>CollectActions : Symbol(CollectActions, Decl(noSilentNeverTypeLeak1.ts, 30, 3)) |
| 140 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 46, 32)) |
| 141 | +>TParams : Symbol(TParams, Decl(noSilentNeverTypeLeak1.ts, 47, 34)) |
| 142 | + |
| 143 | +): ActionFunction<TContext, TParams, TAction>; |
| 144 | +>ActionFunction : Symbol(ActionFunction, Decl(noSilentNeverTypeLeak1.ts, 9, 1)) |
| 145 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 46, 32)) |
| 146 | +>TParams : Symbol(TParams, Decl(noSilentNeverTypeLeak1.ts, 47, 34)) |
| 147 | +>TAction : Symbol(TAction, Decl(noSilentNeverTypeLeak1.ts, 48, 60)) |
| 148 | + |
| 149 | +declare function setup< |
| 150 | +>setup : Symbol(setup, Decl(noSilentNeverTypeLeak1.ts, 52, 46)) |
| 151 | + |
| 152 | + TContext extends MachineContext, |
| 153 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 54, 23)) |
| 154 | +>MachineContext : Symbol(MachineContext, Decl(noSilentNeverTypeLeak1.ts, 2, 28)) |
| 155 | + |
| 156 | + TActions extends Record< |
| 157 | +>TActions : Symbol(TActions, Decl(noSilentNeverTypeLeak1.ts, 55, 34)) |
| 158 | +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) |
| 159 | + |
| 160 | + string, |
| 161 | + ParameterizedObject["params"] | undefined |
| 162 | +>ParameterizedObject : Symbol(ParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 4, 42)) |
| 163 | + |
| 164 | + > = {}, |
| 165 | +>({ |
| 166 | + types, |
| 167 | +>types : Symbol(types, Decl(noSilentNeverTypeLeak1.ts, 60, 3)) |
| 168 | + |
| 169 | + actions, |
| 170 | +>actions : Symbol(actions, Decl(noSilentNeverTypeLeak1.ts, 61, 8)) |
| 171 | + |
| 172 | +}: { |
| 173 | + types?: { context?: TContext }; |
| 174 | +>types : Symbol(types, Decl(noSilentNeverTypeLeak1.ts, 63, 4)) |
| 175 | +>context : Symbol(context, Decl(noSilentNeverTypeLeak1.ts, 64, 11)) |
| 176 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 54, 23)) |
| 177 | + |
| 178 | + actions?: { |
| 179 | +>actions : Symbol(actions, Decl(noSilentNeverTypeLeak1.ts, 64, 33)) |
| 180 | + |
| 181 | + [K in keyof TActions]: ActionFunction< |
| 182 | +>K : Symbol(K, Decl(noSilentNeverTypeLeak1.ts, 66, 5)) |
| 183 | +>TActions : Symbol(TActions, Decl(noSilentNeverTypeLeak1.ts, 55, 34)) |
| 184 | +>ActionFunction : Symbol(ActionFunction, Decl(noSilentNeverTypeLeak1.ts, 9, 1)) |
| 185 | + |
| 186 | + TContext, |
| 187 | +>TContext : Symbol(TContext, Decl(noSilentNeverTypeLeak1.ts, 54, 23)) |
| 188 | + |
| 189 | + TActions[K], |
| 190 | +>TActions : Symbol(TActions, Decl(noSilentNeverTypeLeak1.ts, 55, 34)) |
| 191 | +>K : Symbol(K, Decl(noSilentNeverTypeLeak1.ts, 66, 5)) |
| 192 | + |
| 193 | + ToParameterizedObject<TActions> |
| 194 | +>ToParameterizedObject : Symbol(ToParameterizedObject, Decl(noSilentNeverTypeLeak1.ts, 18, 2)) |
| 195 | +>TActions : Symbol(TActions, Decl(noSilentNeverTypeLeak1.ts, 55, 34)) |
| 196 | + |
| 197 | + >; |
| 198 | + }; |
| 199 | +}): void; |
| 200 | + |
| 201 | +setup({ |
| 202 | +>setup : Symbol(setup, Decl(noSilentNeverTypeLeak1.ts, 52, 46)) |
| 203 | + |
| 204 | + actions: { |
| 205 | +>actions : Symbol(actions, Decl(noSilentNeverTypeLeak1.ts, 74, 7)) |
| 206 | + |
| 207 | + doStuff: enqueueActions((_, params: number) => {}), |
| 208 | +>doStuff : Symbol(doStuff, Decl(noSilentNeverTypeLeak1.ts, 75, 12)) |
| 209 | +>enqueueActions : Symbol(enqueueActions, Decl(noSilentNeverTypeLeak1.ts, 44, 10)) |
| 210 | +>_ : Symbol(_, Decl(noSilentNeverTypeLeak1.ts, 76, 29)) |
| 211 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 76, 31)) |
| 212 | + |
| 213 | + }, |
| 214 | +}); |
| 215 | + |
| 216 | +setup({ |
| 217 | +>setup : Symbol(setup, Decl(noSilentNeverTypeLeak1.ts, 52, 46)) |
| 218 | + |
| 219 | + actions: { |
| 220 | +>actions : Symbol(actions, Decl(noSilentNeverTypeLeak1.ts, 80, 7)) |
| 221 | + |
| 222 | + doStuff: enqueueActions((_, params: number) => {}), |
| 223 | +>doStuff : Symbol(doStuff, Decl(noSilentNeverTypeLeak1.ts, 81, 12)) |
| 224 | +>enqueueActions : Symbol(enqueueActions, Decl(noSilentNeverTypeLeak1.ts, 44, 10)) |
| 225 | +>_ : Symbol(_, Decl(noSilentNeverTypeLeak1.ts, 82, 29)) |
| 226 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 82, 31)) |
| 227 | + |
| 228 | + doOtherStuff: (_, params: string) => {}, |
| 229 | +>doOtherStuff : Symbol(doOtherStuff, Decl(noSilentNeverTypeLeak1.ts, 82, 55)) |
| 230 | +>_ : Symbol(_, Decl(noSilentNeverTypeLeak1.ts, 83, 19)) |
| 231 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 83, 21)) |
| 232 | + |
| 233 | + }, |
| 234 | +}); |
| 235 | + |
| 236 | +setup({ |
| 237 | +>setup : Symbol(setup, Decl(noSilentNeverTypeLeak1.ts, 52, 46)) |
| 238 | + |
| 239 | + actions: { |
| 240 | +>actions : Symbol(actions, Decl(noSilentNeverTypeLeak1.ts, 87, 7)) |
| 241 | + |
| 242 | + doStuff: enqueueActions((_, params: number) => {}), |
| 243 | +>doStuff : Symbol(doStuff, Decl(noSilentNeverTypeLeak1.ts, 88, 12)) |
| 244 | +>enqueueActions : Symbol(enqueueActions, Decl(noSilentNeverTypeLeak1.ts, 44, 10)) |
| 245 | +>_ : Symbol(_, Decl(noSilentNeverTypeLeak1.ts, 89, 29)) |
| 246 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 89, 31)) |
| 247 | + |
| 248 | + doOtherStuff: (_: any, params: string) => {}, |
| 249 | +>doOtherStuff : Symbol(doOtherStuff, Decl(noSilentNeverTypeLeak1.ts, 89, 55)) |
| 250 | +>_ : Symbol(_, Decl(noSilentNeverTypeLeak1.ts, 90, 19)) |
| 251 | +>params : Symbol(params, Decl(noSilentNeverTypeLeak1.ts, 90, 26)) |
| 252 | + |
| 253 | + }, |
| 254 | +}); |
| 255 | + |
0 commit comments