-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Hi everyone!
How I can get rid of the following TS error?
export const getSibling = createAsyncThunk<
{response: Data},
{id: string},
{getState: () => RootState}
>(`Tree_data/fetch_sibling`, async({id}, thunkApi) => {
const {tree: {treeData}} = thunkApi.getState()
// omitted code
}
const RootState = ReturnType<typeof store.getState>
exported from index.ts
In the snippet above TS shows an error : Type { omitted for brevity}
has no properties in common with 'AsyncThunkConfig' for the {getState: () => RootState}
line
Due to limitations of working machine the snippet was re-typed by hand, I hope that it will be enough. Thanks
Metadata
Metadata
Assignees
Labels
No labels