@kayahr/benchmark
    Preparing search index...

    Type Alias TestOperation<T>

    TestOperation: (iteration: number, iterations: number) => T

    Type of a test operation function. It takes two numeric arguments, the first one is the current iteration (starting with 0 and incremented on each iteration), the second one is the total number of iterations to run. These two values can be used as entropy for generating a dynamic result which the function must return to prevent the JS engine from discarding meaningless operations or optimizing static operations which would make the benchmark useless.

    Type Parameters

    • T = unknown

    Type Declaration

      • (iteration: number, iterations: number): T
      • Parameters

        • iteration: number
        • iterations: number

        Returns T