You probably have to add an as const
assertion:
export const keyHelpers: keyHelpersType = {
[actionTypes.addUser]: {
dispatchKey: 'user',
stateKey: 'user',
}
} as const
That way it will not be string
, but "user"
.
CLICK HERE to find out more related problems solutions.