Test whether condition is satisfied.

  • Parameters

    • title: string

      Title of error message when condition is not satisfied

    Returns <T extends boolean | () => boolean | () => Promise<boolean>>(
        condition: T,
    ) => T extends () => Promise<boolean> ? Promise<void> : void

    Currying function