File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export declare namespace BenchNode {
3939
4040 type BenchmarkFunction = ( timer ?: {
4141 start : ( ) => void ;
42+ end : ( iterations ?: number ) => void ;
4243 count : number ;
4344 } ) => void | Promise < void > ;
4445
@@ -80,6 +81,7 @@ export declare namespace BenchNode {
8081
8182export declare const textReport : BenchNode . ReporterFunction ;
8283export declare const chartReport : BenchNode . ReporterFunction ;
84+ export declare const prettyReport : BenchNode . ReporterFunction ;
8385export declare const htmlReport : BenchNode . ReporterFunction ;
8486export declare const jsonReport : BenchNode . ReporterFunction ;
8587export declare const csvReport : BenchNode . ReporterFunction ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 csvReport ,
1111 htmlReport ,
1212 jsonReport ,
13+ prettyReport ,
1314 textReport ,
1415} from ".." ;
1516
@@ -72,6 +73,7 @@ expectType<BenchNode.Suite>(
7273const managedBenchFn : BenchNode . BenchmarkFunction = ( timer ) => {
7374 if ( timer ) {
7475 expectType < ( ) => void > ( timer . start ) ;
76+ expectType < ( iterations ?: number ) => void > ( timer . end ) ;
7577 expectType < number > ( timer . count ) ;
7678 timer . start ( ) ;
7779 for ( let i = 0 ; i < timer . count ; i ++ ) {
@@ -121,6 +123,7 @@ expectType<void>(chartReport(sampleResults));
121123expectType < void > ( htmlReport ( sampleResults ) ) ;
122124expectType < void > ( jsonReport ( sampleResults ) ) ;
123125expectType < void > ( csvReport ( sampleResults ) ) ;
126+ expectType < void > ( prettyReport ( sampleResults ) ) ;
124127
125128// Test Plugins
126129const plugin1 = new V8NeverOptimizePlugin ( ) ;
You can’t perform that action at this time.
0 commit comments