diff --git a/src/types/store.ts b/src/types/store.ts index f45ead30f0..cf8e58aae5 100644 --- a/src/types/store.ts +++ b/src/types/store.ts @@ -40,6 +40,7 @@ declare const $CombinedState: unique symbol interface EmptyObject { readonly [$CombinedState]?: undefined } +export type CleanState = T extends CombinedState ? { [K in keyof S]: CleanState } : T export type CombinedState = EmptyObject & S /** @@ -172,7 +173,7 @@ export interface Store< * * @returns The current state tree of your application. */ - getState(): S + getState(): CleanState /** * Adds a change listener. It will be called any time an action is