@custouch/jssdk
    Preparing search index...

    Interface UseMemoizeReturn<Result, Args>

    interface UseMemoizeReturn<Result, Args extends unknown[]> {
        cache: Map<any, Result>;
        clear(): void;
        delete(...args: Args): void;
        load(...args: Args): Result;
        (...args: Args): Result;
    }

    Type Parameters

    • Result
    • Args extends unknown[]
    • Get result from cache or call memoized function

      Parameters

      Returns Result

    Index

    Properties

    Methods

    Properties

    cache: Map<any, Result>

    Cache container

    Methods

    • Clear cache

      Returns void

    • Delete cache of given arguments

      Parameters

      Returns void

    • Call memoized function and update cache

      Parameters

      Returns Result