summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/StateProvider.tsx3
-rw-r--r--src/custom.d.ts6
2 files changed, 7 insertions, 2 deletions
diff --git a/src/components/StateProvider.tsx b/src/components/StateProvider.tsx
index beb7ce4..6769108 100644
--- a/src/components/StateProvider.tsx
+++ b/src/components/StateProvider.tsx
@@ -42,8 +42,7 @@ export default function Provider({ initialState, actions = {}, children }) {
const getState = useCallback(() => stateRef.current, []);
useEffect(() => {
if (process.env.NODE_ENV === 'development') {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'getState2' does not exist on type 'Windo... Remove this comment to see the full error message
- window.getState2 = getState;
+ (window as any).getState2 = getState;
}
}, [getState]);
const dispatch = useCallback(
diff --git a/src/custom.d.ts b/src/custom.d.ts
index 11b9c6c..db7360a 100644
--- a/src/custom.d.ts
+++ b/src/custom.d.ts
@@ -10,3 +10,9 @@ declare module '*.module.css' {
// webpack definePlugin replacing variables
declare const __VERSION__: string;
declare const __DEV__: string;
+declare const process = {
+ env: {
+ NODE_ENV: string,
+ PUBLIC_URL: string,
+ },
+};