Skip to content

Commit 8cd5d61

Browse files
committed
Add regression test
1 parent 4b813e3 commit 8cd5d61

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
combined: combineReducers({ foo }),
15+
});

0 commit comments

Comments
 (0)