Function defineOnceFn

  • Creates a function that can only be called once.

    Type Parameters

    • T

    Parameters

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

      The function to be called once.

        • (...args): T
        • Parameters

          • Rest ...args: any

          Returns T

    Returns ((this, ...args) => T)

    • A new function that can only be called once.
      • (this, ...args): T
      • Parameters

        • this: any
        • Rest ...args: any

        Returns T