Skip to content

Rework types to better support getting *full* dispatch type#372

Draft
EskiMojo14 wants to merge 4 commits into
masterfrom
type-rework
Draft

Rework types to better support getting *full* dispatch type#372
EskiMojo14 wants to merge 4 commits into
masterfrom
type-rework

Conversation

@EskiMojo14
Copy link
Copy Markdown
Contributor

@EskiMojo14 EskiMojo14 commented Jun 29, 2024

Breaking changes:

  • Change ThunkAction signature from ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction> to ThunkAction<Dispatch, State, ExtraThunkArg, ReturnType>
  • Remove action overload and union overload from middleware type
    • Dispatch must explicitly be cast to ThunkDispatch for union to be supported
  • Rework type signature for thunk overload to use this to infer Dispatch type
    • this allows other overloads to be accounted for automatically

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Jun 29, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@aryaemami59 aryaemami59 added the TypeScript Issues related to TypeScript. label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TypeScript Issues related to TypeScript.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants