UNPKG

@gatling.io/core

Version:

Gatling JS is a JavaScript/TypeScript interface for the [Gatling load testing tool](https://gatling.io/).

18 lines (17 loc) 845 B
import { Executable } from "./execs"; import JvmUniformRandomSwitch = io.gatling.javaapi.core.condition.UniformRandomSwitch; export interface On<T> { on(executable: Executable<any>, ...executables: Executable<any>[]): T; } export interface UniformRandomSwitchFunction<T extends UniformRandomSwitch<T>> { /** * Execute one of the "choices" in a random fashion, with each having even weights. * * @returns a DSL component for defining the "choices" */ (): On<T>; } export interface UniformRandomSwitch<T extends UniformRandomSwitch<T>> { uniformRandomSwitch: UniformRandomSwitchFunction<T>; } export declare const uniformRandomSwitchImpl: <J2, J1 extends JvmUniformRandomSwitch<J2, any>, T extends UniformRandomSwitch<T>>(jvmUniformRandomSwitch: J1, wrap: (wrapped: J2) => T) => UniformRandomSwitchFunction<T>;