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