Created
February 27, 2024 23:53
-
-
Save pedroblandim/9454d2a947dce25bf771e569693d1b02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AsyncThunk, AsyncThunkAction } from "@reduxjs/toolkit"; | |
type AsyncThunkReturnType<C extends AsyncThunkAction<any, any, any>> = C extends AsyncThunkAction<infer T, any, any> ? T : unknown; | |
export type GetAsyncThunkReturnType<T extends AsyncThunk<any, any, any>> = AsyncThunkReturnType<ReturnType<T>>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment