We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b813e3 commit 8cd5d61Copy full SHA for 8cd5d61
tests/cases/compiler/genericFunctionInference2.ts
@@ -0,0 +1,15 @@
1
+// Repro from #30685
2
+
3
+type Reducer<S> = (state: S) => S;
4
+declare function combineReducers<S>(reducers: { [K in keyof S]: Reducer<S[K]> }): Reducer<S>;
5
6
+type MyState = { combined: { foo: number } };
7
+declare const foo: Reducer<MyState['combined']['foo']>;
8
9
+const myReducer1: Reducer<MyState> = combineReducers({
10
+ combined: combineReducers({ foo }),
11
+});
12
13
+const myReducer2 = combineReducers({
14
15
0 commit comments