Function singlerun

Represents a higher-order function that runs a task only once and provides a way to clear the result.

  • Type Parameters

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

      The function type.

    Parameters

    • run: T

      The function to be executed.

    Returns T & IClearable & ITaskStatus

    • The wrapped function with additional clear functionality.