'Object literal may only specify known properties, and 'memoizeOptions' does not exist in type

this my code

import { createSelector } from '@reduxjs/toolkit'

const selectNumCompletedTodos2 = createSelector(
    (state: RootState) => state.counter.ok.ok,
    (state: RootState) => state.counter.ok.ok,
    (ok: number, ok1: number) => `${ok} + ${ok1}`,
    {

        memoizeOptions: {
            equalityCheck: (a, b) => {
                return a === b;
            },
        }
    }
)

I get this error

The last overload gave the following error. Argument of type '{ memoizeOptions: { equalityCheck: (a: any, b: any) => boolean; }; }' is not assignable to parameter of type '(res1: number, res2: number, res3: string) => unknown'. Object literal may only specify known properties, and 'memoizeOptions' does not exist in type '(res1: number, res2: number, res3: string) => unknown'.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source