• Only initialize the variable/value when it is accessed for the first time by wrapping the value in Lazy Proxy that is initialize only once it is acessed.

    Type Parameters

    • T extends object

    • TArgs extends any[]

    Parameters

    • initializer: ((...args) => T)

      Initializer function

        • (...args): T
        • Parameters

          • Rest ...args: TArgs

          Returns T

    • Rest ...args: TArgs

      Arguments to be passed

    Returns T

    Return value of the lazy initailize