Skip to content

Commit

Permalink
add else comments
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Aug 3, 2019
1 parent 1e05a8d commit 93509ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/createAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ export type PayloadActionCreator<
> =
IfPrepareActionMethodProvided<PA,
ActionCreatorWithPreparedPayload<PA, T>,
// else
IfMaybeUndefined<P,
ActionCreatorWithOptionalPayload<P, T>,
// else
IfVoid<P,
ActionCreatorWithoutPayload<T>,
// else
ActionCreatorWithPayload<P, T>
>
>
Expand Down
2 changes: 2 additions & 0 deletions src/createSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ type CaseReducerActions<CaseReducers extends SliceCaseReducers<any, any>> = {
[Type in keyof CaseReducers]:
IfIsEnhancedReducer<CaseReducers[Type],
ActionCreatorWithPreparedPayload<PrepareActionForReducer<CaseReducers[Type]>>,
// else
IfIsReducerFunctionWithoutAction<CaseReducers[Type],
ActionCreatorWithoutPayload,
// else
PayloadActionCreator<PayloadForReducer<CaseReducers[Type]>>
>
>
Expand Down

0 comments on commit 93509ee

Please sign in to comment.