Function memo

  • Internal

    Turn a thunk into a memoized version of itself. The memoized thunk invokes the original thunk only on its first invocation and caches the result for later uses. We use this to implement a version of jtv.lazy with memoization.

    Type Parameters

    • A

    Parameters

    • thunk: () => A

    Returns () => A