diff --git a/src/react.ts b/src/react.ts index 48a35e3f89..f833bdb449 100644 --- a/src/react.ts +++ b/src/react.ts @@ -23,6 +23,7 @@ type ExtractState = S extends { getState: () => infer T } ? T : never type ReadonlyStoreApi = Pick, 'getState' | 'subscribe'> type WithReact> = S & { + /** @deprecated please use api.getState() */ getServerState?: () => ExtractState } diff --git a/src/traditional.ts b/src/traditional.ts index 478f986725..167f975388 100644 --- a/src/traditional.ts +++ b/src/traditional.ts @@ -23,6 +23,7 @@ type ExtractState = S extends { getState: () => infer T } ? T : never type ReadonlyStoreApi = Pick, 'getState' | 'subscribe'> type WithReact> = S & { + /** @deprecated please use api.getState() */ getServerState?: () => ExtractState }