File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed
Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,7 @@ import type {
2020 ReducerWithInitialState ,
2121} from './createReducer'
2222import { createReducer , makeGetInitialState } from './createReducer'
23- import type {
24- EntityMethodsCreator ,
25- entityMethodsCreatorType ,
26- } from './entities/slice_creator'
23+ import type { EntityMethodsCreator } from './entities/slice_creator'
2724import type { ActionReducerMapBuilder , TypedActionCreator } from './mapBuilders'
2825import { executeReducerBuilderCallback } from './mapBuilders'
2926import type {
@@ -40,6 +37,7 @@ export enum ReducerType {
4037 reducer = 'reducer' ,
4138 reducerWithPrepare = 'reducerWithPrepare' ,
4239 asyncThunk = 'asyncThunk' ,
40+ entityMethods = 'entityMethods' ,
4341}
4442
4543export type RegisteredReducerType = keyof SliceReducerCreators <
@@ -150,7 +148,7 @@ export interface SliceReducerCreators<
150148 AsyncThunkCreator < State > ,
151149 AsyncThunkCreatorExposes < State , CaseReducers >
152150 >
153- [ entityMethodsCreatorType ] : ReducerCreatorEntry < EntityMethodsCreator < State > >
151+ [ ReducerType . entityMethods ] : ReducerCreatorEntry < EntityMethodsCreator < State > >
154152}
155153
156154export type ReducerCreators <
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type {
33 PayloadAction ,
44 ReducerCreator ,
55} from '@reduxjs/toolkit'
6- import { reducerCreator } from '../createSlice'
6+ import { reducerCreator , ReducerType } from '../createSlice'
77import type { WithRequiredProp } from '../tsHelpers'
88import type {
99 EntityAdapter ,
@@ -14,8 +14,6 @@ import type {
1414} from './models'
1515import { capitalize } from './utils'
1616
17- export const entityMethodsCreatorType = '@@rtk/entityMethodsCreator'
18-
1917export interface EntityMethodsCreatorConfig <
2018 T ,
2119 Id extends EntityId ,
@@ -124,9 +122,7 @@ export function createEntityMethods<
124122 return reducers as any
125123}
126124
127- export const entityMethodsCreator : ReducerCreator <
128- typeof entityMethodsCreatorType
129- > = {
130- type : entityMethodsCreatorType ,
125+ export const entityMethodsCreator : ReducerCreator < ReducerType . entityMethods > = {
126+ type : ReducerType . entityMethods ,
131127 create : createEntityMethods ,
132128}
You can’t perform that action at this time.
0 commit comments