tinybench - v4.0.1
    Preparing search index...

    Type Alias Hook

    Hook: (task?: Task, mode?: "run" | "warmup") => Promise<void> | void

    The hook function signature If warmup is enabled, the hook will be called twice, once for the warmup and once for the run.

    Type declaration

      • (task?: Task, mode?: "run" | "warmup"): Promise<void> | void
      • Parameters

        • Optionaltask: Task

          the task instance

        • Optionalmode: "run" | "warmup"

          the mode where the hook is being called

        Returns Promise<void> | void