diff --git a/package.json b/package.json index 17adc4d2b3..f0fa04d494 100644 --- a/package.json +++ b/package.json @@ -79,8 +79,8 @@ "prettier-plugin-jsdoc": "^1.3.0", "svelte-jester": "^2.3.2", "synckit": "^0.8.5", - "typescript": "^5.6.2", - "typescript-eslint": "^8.0.1", + "typescript": "^5.7.2", + "typescript-eslint": "^8.16.0", "vue": "^3.0.11" }, "husky": { diff --git a/packages/xstate-inspect/src/server.ts b/packages/xstate-inspect/src/server.ts index 2762f0eb74..8926294c76 100644 --- a/packages/xstate-inspect/src/server.ts +++ b/packages/xstate-inspect/src/server.ts @@ -68,7 +68,7 @@ export function inspect(options: ServerInspectorOptions): Inspector { }; server.on('connection', function connection(wsClient) { - wsClient.on('message', function incoming(data, isBinary) { + wsClient.on('message', function incoming(data: unknown, isBinary) { if (isBinary) { return; } diff --git a/packages/xstate-react/test/useActor.test.tsx b/packages/xstate-react/test/useActor.test.tsx index ea8b20c30b..d6a447d84a 100644 --- a/packages/xstate-react/test/useActor.test.tsx +++ b/packages/xstate-react/test/useActor.test.tsx @@ -13,7 +13,8 @@ import { assign, createActor, createMachine, - raise + raise, + setup } from 'xstate'; import { fromCallback, fromObservable, fromPromise } from 'xstate/actors'; import { useActor, useSelector } from '../src/index.ts'; @@ -664,37 +665,34 @@ describeEachReactMode('useActor (%s)', ({ suiteKey, render }) => { it('should be able to use a delay provided outside of React', () => { jest.useFakeTimers(); - const machine = createMachine( - { - initial: 'a', - states: { - a: { - on: { - EV: 'b' - } - }, - b: { - after: { - myDelay: 'c' - } - }, - c: {} + const machine = setup({ + delays: { + myDelay: () => { + return 300; } - }, - { - delays: { - myDelay: () => { - return 300; + } + }).createMachine({ + initial: 'a', + states: { + a: { + on: { + EV: 'b' } - } + }, + b: { + after: { + myDelay: 'c' + } + }, + c: {} } - ); + }); const App = () => { const [state, send] = useActor(machine); return ( <> -
{state.value as string}
+
{state.value}