React 18: Intermediate Topics error on useMutation:mutationFn (topic 18&19))

I follow the code in videos and occur this error when implement AddTodoContext to useMutation function during optimistic updae section. im currently on creating useAddTodo file but still face the same error

No overload matches this call.
The last overload gave the following error.
Object literal may only specify known properties, and ‘mutationFn’ does not exist in type ‘readonly unknown’.
The last overload is declared here.
Parameter ‘savedTodo’ implicitly has an ‘any’ type.
Parameter ‘newTodo’ implicitly has an ‘any’ type.
Parameter ‘error’ implicitly has an ‘any’ type.
Parameter ‘newTodo’ implicitly has an ‘any’ type.
Parameter ‘context’ implicitly has an ‘any’ type.

There is a mistake in your code at line number 20, change the code to this

const previousTodos = queryClient.getQueryData<Todo[]>(CACHE_KEY_TODOS) || [];

The mistake was with the barackets of getQueryData, you have included the empty array in its attribute.