@gatling.io/core
Version:
Gatling JS is a JavaScript/TypeScript interface for the [Gatling load testing tool](https://gatling.io/).
28 lines (27 loc) • 1.3 kB
TypeScript
import { SessionTo } from "../session";
import { On } from "./on";
import JvmDoWhile = io.gatling.javaapi.core.loop.DoWhile;
export interface DoWhileFunction<T extends DoWhile<T>> {
/**
* Define a loop that will iterate as long as the condition holds true. The condition is evaluated
* at the end of the loop.
*
* @param condition the condition, expressed as a Gatling Expression Language String
* @param counterName the name of the loop counter, as stored in the Session
* @return a DSL component for defining the loop content
*/
(condition: string, counterName?: string): On<T>;
/**
* Define a loop that will iterate as long as the condition holds true. The condition is evaluated
* at the end of the loop.
*
* @param condition the condition, expressed as a function
* @param counterName the name of the loop counter, as stored in the Session
* @return a DSL component for defining the loop content
*/
(condition: SessionTo<boolean>, counterName?: string): On<T>;
}
export interface DoWhile<T extends DoWhile<T>> {
doWhile: DoWhileFunction<T>;
}
export declare const doWhileImpl: <J2, J1 extends JvmDoWhile<J2, any>, T extends DoWhile<T>>(jvmDoWhile: J1, wrap: (wrapped: J2) => T) => DoWhileFunction<T>;