diff --git a/trivia-game-react/src/machine.ts b/trivia-game-react/src/machine.ts index 38fdfdba6..4274d9bc0 100644 --- a/trivia-game-react/src/machine.ts +++ b/trivia-game-react/src/machine.ts @@ -25,7 +25,7 @@ const machine = Machine( onDone: { target: 'quiz', actions: assign({ - questions: (_, event) => event.data, + questions: (_: any, event: { data: unknown}) => event.data, }), }, onError: { @@ -70,7 +70,7 @@ const machine = Machine( questions: [], totalCorrectAnswers: 0, }), - updateAnswer: assign((ctx, event: any) => ({ + updateAnswer: assign((ctx: any, event: any) => ({ questions: [ ...ctx.questions.slice(0, ctx.currentQuestion), { @@ -90,7 +90,7 @@ const machine = Machine( })), }, guards: { - allQuestionsAnswered: ctx => { + allQuestionsAnswered: (ctx: any) => { return ( ctx.questions.filter( (question: any) => question.correct !== undefined,