Skip to content

Commit be718ea

Browse files
tuulingtimche
authored andcommitted
fix typing: initialState can be optional (#29)
* Update index.d.ts initialState can be NULL also. * Update index.d.ts Overload for when no initalState is provided.
1 parent 2850ecc commit be718ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type Action = {
44

55
type Reducer<S> = (state: S, action: Action) => S;
66

7-
export default function reduceReducer<S>(
8-
initialState: S,
9-
...reducers: Array<Reducer<S>>
10-
): Reducer<S>;
7+
function reduceReducers<S>(initialState: S | null, ...reducers: Reducer<S>[]): Reducer<S>;
8+
function reduceReducers<S>(...reducers: Reducer<S>[]): Reducer<S>;
9+
10+
export default reduceReducer;

0 commit comments

Comments
 (0)