Function diOnceSet

Override cached result of diOnce call

Should be cached within diInit callback

const fun = diOnce(n => n + 1)
fun(1) // 2
diOnceSet(fun, 9)
fun(8) // 9
  • Type Parameters

    • T extends ((...args: any[]) => any)

    Parameters

    • fn: T
    • value: ReturnType<T>

    Returns void