diff --git a/.gitignore b/.gitignore index b2ff859..2597dd9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ es lib .DS_Store *.log +.idea/ diff --git a/index.d.ts b/index.d.ts index f29eb8c..a3a585a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,13 +1,14 @@ -type Action = { - type: string; +type Action = { + type: T; }; -type Reducer = (state: S, action: Action) => S; +type Reducer = (state: S, action: A) => S; -export default function reduceReducers( - initialState: S | null, - ...reducers: Reducer[] -): Reducer; -export default function reduceReducers( - ...reducers: Reducer[] -): Reducer; +export default function reduceReducers( + initialState?: S, + ...reducers: Reducer[] +): Reducer; + +export default function reduceReducers( + ...reducers: Reducer[] +): Reducer;