From a807b3361c995bb11b223f357d13ac71ea01131a Mon Sep 17 00:00:00 2001 From: David Khourshid Date: Wed, 27 Nov 2024 16:17:34 -0500 Subject: [PATCH 1/8] Update TypeScript version and add type assertions in tests --- package.json | 2 +- packages/xstate-react/test/useActor.test.tsx | 4 +- .../xstate-react/test/useSelector.test.tsx | 2 +- pnpm-lock.yaml | 101 ++++++++++-------- 4 files changed, 58 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index 17adc4d2b3..dcc1784298 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "prettier-plugin-jsdoc": "^1.3.0", "svelte-jester": "^2.3.2", "synckit": "^0.8.5", - "typescript": "^5.6.2", + "typescript": "^5.7.2", "typescript-eslint": "^8.0.1", "vue": "^3.0.11" }, diff --git a/packages/xstate-react/test/useActor.test.tsx b/packages/xstate-react/test/useActor.test.tsx index ea8b20c30b..5726d5d0c6 100644 --- a/packages/xstate-react/test/useActor.test.tsx +++ b/packages/xstate-react/test/useActor.test.tsx @@ -815,7 +815,7 @@ describeEachReactMode('useActor (%s)', ({ suiteKey, render }) => { return ( <> - {state.value} + {state.value as string} ); }; @@ -1044,7 +1044,7 @@ describeEachReactMode('useActor (%s)', ({ suiteKey, render }) => { const App = () => { const [state] = useActor(machine); - return <>{state.value}; + return <>{state.value as string}; }; const { container } = render(); diff --git a/packages/xstate-react/test/useSelector.test.tsx b/packages/xstate-react/test/useSelector.test.tsx index 3de48d3a97..0c88b1b2c3 100644 --- a/packages/xstate-react/test/useSelector.test.tsx +++ b/packages/xstate-react/test/useSelector.test.tsx @@ -537,7 +537,7 @@ describeEachReactMode('useSelector (%s)', ({ suiteKey, render }) => { return ( <> - {value} + {value as number}