Skip to content

Commit

Permalink
Fix imports of rtk types
Browse files Browse the repository at this point in the history
These were imported from the src folder of rtk because they weren't
exported in earlier versions of rtk. Seems like some new config makes
this cause an error, but they have been added to exports so we can just
import them normally.
  • Loading branch information
eikhr committed Sep 25, 2024
1 parent 8ae9420 commit 67a86b8
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
8 changes: 5 additions & 3 deletions app/reducers/comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { EntityType } from 'app/store/models/entities';
import { parseContentTarget } from 'app/store/utils/contentTarget';
import createLegoAdapter from 'app/utils/legoAdapter/createLegoAdapter';
import { addReactionCases } from './reactions';
import type { EntityId } from '@reduxjs/toolkit';
import type { EntityState } from '@reduxjs/toolkit/src/entities/models';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit/src/mapBuilders';
import type {
EntityId,
EntityState,
ActionReducerMapBuilder,
} from '@reduxjs/toolkit';
import type { RootState } from 'app/store/createRootReducer';
import type { AnyAction } from 'redux';

Expand Down
9 changes: 6 additions & 3 deletions app/reducers/reactions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Reaction } from 'app/actions/ActionTypes';
import { parseContentTarget } from 'app/store/utils/contentTarget';
import type { AnyAction, EntityId } from '@reduxjs/toolkit';
import type { EntityState } from '@reduxjs/toolkit/src/entities/models';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit/src/mapBuilders';
import type {
AnyAction,
EntityId,
EntityState,
ActionReducerMapBuilder,
} from '@reduxjs/toolkit';
import type { ReactionsGrouped } from 'app/store/models/Reaction';
import type { EntityType } from 'app/store/models/entities';

Expand Down
2 changes: 1 addition & 1 deletion app/utils/legoAdapter/buildActionGrantReducer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isAsyncApiActionSuccess } from 'app/utils/legoAdapter/asyncApiActions';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit/src/mapBuilders';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit';
import type { EntityType } from 'app/store/models/entities';

interface StateWithActionGrant {
Expand Down
8 changes: 5 additions & 3 deletions app/utils/legoAdapter/buildDeleteEntityReducer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { isAsyncApiActionSuccess } from 'app/utils/legoAdapter/asyncApiActions';
import type { EntityId } from '@reduxjs/toolkit';
import type { EntityState } from '@reduxjs/toolkit/src/entities/models';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit/src/mapBuilders';
import type {
EntityId,
EntityState,
ActionReducerMapBuilder,
} from '@reduxjs/toolkit';
import type { AsyncActionType } from 'app/types';
import type { DeleteMeta } from 'app/utils/legoAdapter/asyncApiActions';

Expand Down
9 changes: 6 additions & 3 deletions app/utils/legoAdapter/buildEntitiesReducer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { isAsyncApiActionSuccess } from 'app/utils/legoAdapter/asyncApiActions';
import type { EntityAdapter, EntityId } from '@reduxjs/toolkit';
import type { EntityState } from '@reduxjs/toolkit/src/entities/models';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit/src/mapBuilders';
import type {
EntityAdapter,
EntityId,
EntityState,
ActionReducerMapBuilder,
} from '@reduxjs/toolkit';
import type Entities from 'app/store/models/entities';
import type { EntityType } from 'app/store/models/entities';

Expand Down
2 changes: 1 addition & 1 deletion app/utils/legoAdapter/buildFetchingReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
isAsyncApiActionFailure,
isAsyncApiActionSuccess,
} from 'app/utils/legoAdapter/asyncApiActions';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit/src/mapBuilders';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit';
import type { AsyncActionType } from 'app/types';

type StateWithFetching = {
Expand Down
3 changes: 1 addition & 2 deletions app/utils/legoAdapter/buildPaginationReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import {
isAsyncApiActionFailure,
isAsyncApiActionSuccess,
} from 'app/utils/legoAdapter/asyncApiActions';
import type { EntityId } from '@reduxjs/toolkit';
import type { ActionReducerMapBuilder } from '@reduxjs/toolkit/src/mapBuilders';
import type { EntityId, ActionReducerMapBuilder } from '@reduxjs/toolkit';
import type { AsyncActionType } from 'app/types';
import type {
FetchMeta,
Expand Down

0 comments on commit 67a86b8

Please sign in to comment.