我有两个由redux-toolkit的createAsyncThunk()函数创建的异步thunks。
例如。
const getOrder = createAsyncThunk('a/getOrder', async (_, thunkAPI) => {
// `userId` from API.getUser()
// I tried to get the `userId` from redux store, but got `undefined`.
const user = thunkAPI.getState().user;
const userId
我似乎不能接收来自createAsyncThunk函数的Promise来自Redux-toolkit我对Typescript还很陌生,我在努力弄清楚为什么它会给我Property 'then' does not exist on type 'AsyncThunkAction<Student, number, {}>'错误,即使如果我删除键入就会返回promise。这是我的createAsyncThunk f-n export const getStudentByIdRequest = createAsyncThunk<Student, num