Skip to content

Commit

Permalink
refactor(app/actionObserver): simplify matchType
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Dec 7, 2023
1 parent b6f9f57 commit a9fc34a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/actionObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ActionObserver {
const matchType =
<TPayload>(actionCreator: PayloadActionCreator<TPayload>) =>
(action: Action): action is PayloadAction<TPayload> =>
actionCreator.match(action)
action.type === actionCreator.type

const getPayload = <TPayload>(action: PayloadAction<TPayload>): TPayload => action.payload

Expand Down

0 comments on commit a9fc34a

Please sign in to comment.