@arcmantle/library
    Preparing search index...

    Function lazy

    • The lazy function is a higher-order utility function that allows the creation of a lazily-initialized object.

      It takes a function fn as an argument and returns an object with a single property value.

      The property value is initialized by calling fn only when it is accessed for the first time.

      Type Parameters

      • T

      Parameters

      • fn: () => T

      Returns { value: T }