diff options
Diffstat (limited to 'testing/bench_example.ts')
| -rw-r--r-- | testing/bench_example.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/bench_example.ts b/testing/bench_example.ts index 86e25b9a6..d27fb97e8 100644 --- a/testing/bench_example.ts +++ b/testing/bench_example.ts @@ -2,7 +2,7 @@ import { BenchmarkTimer, bench, runIfMain } from "./bench.ts"; // Basic -bench(function forIncrementX1e9(b: BenchmarkTimer) { +bench(function forIncrementX1e9(b: BenchmarkTimer): void { b.start(); for (let i = 0; i < 1e9; i++); b.stop(); @@ -12,7 +12,7 @@ bench(function forIncrementX1e9(b: BenchmarkTimer) { bench({ name: "runs100ForIncrementX1e6", runs: 100, - func(b) { + func(b): void { b.start(); for (let i = 0; i < 1e6; i++); b.stop(); @@ -20,7 +20,7 @@ bench({ }); // Itsabug -bench(function throwing(b) { +bench(function throwing(b): void { b.start(); // Throws bc the timer's stop method is never called }); |
