procedural-to-declarative
    Preparing search index...

    Function runDeclarative

    • Run a declarative function as a task and add it to the track. Must not be called within another declarative function.

      Type Parameters

      • TNumber extends number = number

      Parameters

      • track: Track<TNumber>

        The track to add the task to.

      • f: (time: TNumber) => void

        The declarative function to run as a task.

      • duration: number | TNumber

        The duration of the task. Can be Infinity for infinite duration.

      Returns TaskDeclarative<TNumber>

      A Task object that can be suspended and resumed.