Function wait

  • An async pause for the given duration.

    Parameters

    • duration: Readonly<Partial<Record<DurationUnit, undefined | number>>>

    Returns Promise<void>

    • waitValue : return a value after the wait finishes.