declare namespace JSVerify { type Arbitrary = ArbitraryLike & ArbitraryFns; interface ArbitraryLike { generator : Generator; show : Show; shrink : Shrink; } interface ArbitraryFns { smap(f : (t : T) => U, g : (u : U) => T, newShow? : Show) : Arbitrary; } function bless(arb : ArbitraryLike) : Arbitrary; function sampler(arb : Arbitrary, genSize? : number) : (sampleSize : number) => U; function small(arb : Arbitrary) : Arbitrary; function suchthat(arb : Arbitrary, predicate : (u : U) => boolean) : Arbitrary; interface Options { tests : number; size : number; quiet : boolean; rngState : string; } interface Result { counterexample : T; tests : number; shrinks : number; exc? : string; rngState : string; } type Generator = GeneratorFn & GeneratorFns; type GeneratorFn = (size : number) => T; interface GeneratorFns { map(f : (t : T) => U) : Generator; flatmap(f : (t : T) => Generator) : Generator; } type Shrink = ShrinkFn & ShrinkFns; type ShrinkFn = (t : T) => T[]; interface ShrinkFns { smap(f : (t : T) => U, g : (u : U) => T) : Shrink; } type Show = (t : T) => string; type Property = boolean | void | T; type integerFn = (maxsize : number) => Arbitrary; type integerFn2 = (minsize : number, maxsize : number) => Arbitrary; const integer : Arbitrary & integerFn & integerFn2; const nat : Arbitrary & integerFn; const number : Arbitrary & integerFn & integerFn2; const uint8 : Arbitrary; const uint16 : Arbitrary; const uint32 : Arbitrary; const int8 : Arbitrary; const int16 : Arbitrary; const int32 : Arbitrary; const bool : Arbitrary; const datetime : Arbitrary; function elements(args : T[]) : Arbitrary; const falsy : Arbitrary; function constant(x : T) : Arbitrary; const char : Arbitrary; const asciichar : Arbitrary; const string : Arbitrary; const nestring : Arbitrary; const asciistring : Arbitrary; const asciinestring : Arbitrary; //Combinators function nonShrink(arb : Arbitrary) : Arbitrary; function either(arbA : Arbitrary, arbB : Arbitrary) : Arbitrary; function pair(arbA : Arbitrary, arbB : Arbitrary) : Arbitrary<[T, U]>; function tuple(arbs : Arbitrary[]) : Arbitrary; function sum(arbs : Arbitrary[]) : Arbitrary; function dict(arb : Arbitrary) : Arbitrary<{ [s : string]: T }>; function array(arb : Arbitrary) : Arbitrary; function nearray(arb : Arbitrary) : Arbitrary; function fn(arb : Arbitrary) : Arbitrary<(a : any) => T>; function fun(arb : Arbitrary) : Arbitrary<(a : any) => T>; const json : Arbitrary; const unit : Arbitrary; function oneOf(gs : Arbitrary[]) : Arbitrary; function forall(arb1 : Arbitrary, prop : (t : A) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, prop : (t : A, u : B) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, prop : (t : A, u : B, v : C) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, prop : (t : A, u : B, v : C, w : D) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I) => Property) : Property; function forall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, arb10 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I, f : J) => Property) : Property; function forall(...args : any[]) : Property; function assertForall(arb1 : Arbitrary, prop : (t : A) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, prop : (t : A, u : B) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, prop : (t : A, u : B, v : C) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, prop : (t : A, u : B, v : C, w : D) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I) => Property) : void; function assertForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, arb10 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I, f : J) => Property) : void; function assertForall(...args : any[]) : void; function checkForall(arb1 : Arbitrary, prop : (t : A) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, prop : (t : A, u : B) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, prop : (t : A, u : B, v : C) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, prop : (t : A, u : B, v : C, w : D) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I) => Property) : Result; function checkForall(arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, arb10 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I, f : J) => Property) : Result; function checkForall(...args : any[]) : Result; function property(description: String, arb1 : Arbitrary, prop : (t : A) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, prop : (t : A, u : B) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, prop : (t : A, u : B, v : C) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, prop : (t : A, u : B, v : C, w : D) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I) => Property) : any; function property(description: String, arb1 : Arbitrary, arb2 : Arbitrary, arb3 : Arbitrary, arb4 : Arbitrary, arb5 : Arbitrary, arb6 : Arbitrary, arb7 : Arbitrary, arb8 : Arbitrary, arb9 : Arbitrary, arb10 : Arbitrary, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I, f : J) => Property) : any; function property(...args : any[]) : Result; function check(prop : Property, opts? : Options) : Result; function assert(prop : Property, opts? : Options) : void; const generator : GeneratorFunctions; const shrink : ShrinkFunctions; const show : ShowFunctions; const random : Random; interface GeneratorFunctions { constant(u : U) : Generator; oneOf(gens : Generator[]) : Generator; recursive(genZ : Generator, f : (u : U) => U) : Generator; pair(genA : Generator, genB : Generator) : Generator<[T, U]>; either(genA : Generator, genB : Generator) : Generator; tuple(gens : Generator[]) : Generator; sum(gens : Generator[]) : Generator; array(gen : Generator) : Generator; nearray(gen : Generator) : Generator; dict(gen : Generator) : Generator<{ [key : string]: U }>; unit : Generator; bless(genLike : GeneratorFn) : Generator; small(gen : Generator) : Generator; combine(arb1 : Generator, prop : (t : A) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, prop : (t : A, u : B) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, prop : (t : A, u : B, v : C) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, arb4 : Generator, prop : (t : A, u : B, v : C, w : D) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, arb4 : Generator, arb5 : Generator, prop : (t : A, u : B, v : C, w : D, e : E) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, arb4 : Generator, arb5 : Generator, arb6 : Generator, prop : (t : A, u : B, v : C, w : D, e : E, a : F) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, arb4 : Generator, arb5 : Generator, arb6 : Generator, arb7 : Generator, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, arb4 : Generator, arb5 : Generator, arb6 : Generator, arb7 : Generator, arb8 : Generator, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, arb4 : Generator, arb5 : Generator, arb6 : Generator, arb7 : Generator, arb8 : Generator, arb9 : Generator, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I) => R) : Generator; combine(arb1 : Generator, arb2 : Generator, arb3 : Generator, arb4 : Generator, arb5 : Generator, arb6 : Generator, arb7 : Generator, arb8 : Generator, arb9 : Generator, arb10 : Generator, prop : (t : A, u : B, v : C, w : D, e : E, a : F, b : G, c : H, d : I, f : J) => R) : Generator; combine(...args : any[]) : Generator; } interface ShrinkFunctions { noop : Shrink; pair(shrA : Shrink, shrB : Shrink) : Shrink<[T, U]>; either(shrA : Shrink, shrB : Shrink) : Shrink; tuple(shrs : Shrink[]) : Shrink; sum(shrs : Shrink[]) : Shrink; array(shr : Shrink) : Shrink; nearray(shr : Shrink) : Shrink; bless(shrinkLike : ShrinkFn) : Shrink; } interface ShowFunctions { def(x : T) : string; pair(sA : Show, sB : Show, x : [T, U]) : string; either(sA : Show, sB : Show, x : (T | U)) : string; tuple(shs : Show[], x : any[]) : string; sum(shs : Show[], x : any) : string; array(sh : Show, x : T[]) : string; } type Random = RandomInt & RandomFunctions; type RandomInt = (min : number, max : number) => number; interface RandomFunctions { number(min : number, max : number) : number; } } export = JSVerify;