//@ts-check const { benchmarkDecorator } = require('./utils'); const { test, testGuard } = require('./tests'); const arr = new Array(10 ** 6).fill(1); // arr.push('-') /** * @type {Parameters<benchmarkDecorator>[1]} */ const options = { warmingUp: 0, testCount: 10, args: [arr], verbose: false } console.log(options); const testResults = benchmarkDecorator(test, options); console.log(testResults); const testGuardResults = benchmarkDecorator(testGuard, options); console.log(testGuardResults);
(ваш голос учтен)