Skip to content

Commit 0195fea

Browse files
committed
fix(bench): update TS doc examples to reference exported variable main
1 parent 16b69da commit 0195fea

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

  • lib/node_modules/@stdlib/bench/harness/docs/types

lib/node_modules/@stdlib/bench/harness/docs/types/index.d.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ interface Benchmark {
235235
* b.skip( true, 'This is skipped.' );
236236
* }
237237
*/
238-
skip( value: any, msg: string ): void;
238+
skip( value: boolean, msg: string ): void;
239239

240240
/**
241241
* Generates an assertion which should be implemented.
@@ -253,7 +253,7 @@ interface Benchmark {
253253
* b.todo( true, 'This is a todo.' );
254254
* }
255255
*/
256-
todo( value: any, msg: string ): void;
256+
todo( value: boolean, msg: string ): void;
257257

258258
/**
259259
* Generates a failing assertion.
@@ -296,7 +296,7 @@ interface Benchmark {
296296
* b.ok( false, 'This asserts a value is truthy.' );
297297
* }
298298
*/
299-
ok( value: any, msg?: string ): void;
299+
ok( value: boolean, msg?: string ): void;
300300

301301
/**
302302
* Asserts that a `value` is falsy.
@@ -315,7 +315,7 @@ interface Benchmark {
315315
* b.notOk( true, 'This asserts a value is falsy.' );
316316
* }
317317
*/
318-
notOk( value: any, msg?: string ): void;
318+
notOk( value: boolean, msg?: string ): void;
319319

320320
/**
321321
* Asserts that `actual` is **strictly** equal to `expected`.
@@ -341,6 +341,7 @@ interface Benchmark {
341341
* b.equal( 1.0, 2.0, 'This asserts two values are strictly equal.' );
342342
* }
343343
*/
344+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
344345
equal( actual: any, expected: any, msg?: string ): void;
345346

346347
/**
@@ -367,6 +368,7 @@ interface Benchmark {
367368
* b.notEqual( actual, expected, 'This asserts two values are not equal.' );
368369
* }
369370
*/
371+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
370372
notEqual( actual: any, expected: any, msg?: string ): void;
371373

372374
/**
@@ -403,6 +405,7 @@ interface Benchmark {
403405
* b.deepEqual( actual, expected, 'This asserts two values are deeply equal.' );
404406
* }
405407
*/
408+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
406409
deepEqual( actual: any, expected: any, msg?: string ): void;
407410

408411
/**
@@ -439,6 +442,7 @@ interface Benchmark {
439442
* b.notDeepEqual( actual, expected, 'This asserts two values are not deeply equal.' );
440443
* }
441444
*/
445+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
442446
notDeepEqual( actual: any, expected: any, msg?: string ): void;
443447
}
444448

@@ -463,7 +467,7 @@ interface Harness {
463467
* @example
464468
* var stdout = require( '@stdlib/streams/node/stdout' );
465469
*
466-
* var harness = bench.createHarness();
470+
* var harness = main.createHarness();
467471
* var stream = harness.createStream();
468472
*
469473
* // Direct all results to `stdout`:
@@ -496,7 +500,7 @@ interface Harness {
496500
* @example
497501
* var stdout = require( '@stdlib/streams/node/stdout' );
498502
*
499-
* var harness = bench.createHarness();
503+
* var harness = main.createHarness();
500504
*
501505
* var stream = harness.createStream();
502506
* stream.pipe( stdout );
@@ -540,7 +544,7 @@ interface Harness {
540544
* @example
541545
* var stdout = require( '@stdlib/streams/node/stdout' );
542546
*
543-
* var harness = bench.createHarness();
547+
* var harness = main.createHarness();
544548
*
545549
* var stream = harness.createStream();
546550
* stream.pipe( stdout );
@@ -577,7 +581,7 @@ interface Harness {
577581
* **Read-only** property whose value is the harness exit code. If all benchmarks run successfully (i.e., no failing assertions), the exit code is `0`; otherwise, the exit code is `1`.
578582
*
579583
* @example
580-
* var harness = bench.createHarness();
584+
* var harness = main.createHarness();
581585
*
582586
* // Benchmarks only start running when results have a destination:
583587
* var stream = harness.createStream();
@@ -617,7 +621,7 @@ interface Main {
617621
* @returns benchmark harness
618622
*
619623
* @example
620-
* bench( 'beep', function benchmark( b ) {
624+
* main( 'beep', function benchmark( b ) {
621625
* var x;
622626
* var i;
623627
* b.tic();
@@ -654,7 +658,7 @@ interface Main {
654658
* 'repeats': 5
655659
* };
656660
*
657-
* bench( 'beep', opts, function benchmark( b ) {
661+
* main( 'beep', opts, function benchmark( b ) {
658662
* var x;
659663
* var i;
660664
* b.tic();
@@ -723,7 +727,7 @@ interface Main {
723727
* @returns benchmark harness
724728
*
725729
* @example
726-
* bench( 'beep', function benchmark( b ) {
730+
* main( 'beep', function benchmark( b ) {
727731
* var x;
728732
* var i;
729733
* b.tic();
@@ -745,7 +749,7 @@ interface Main {
745749
* 'repeats': 5
746750
* };
747751
*
748-
* bench( 'beep', opts, function benchmark( b ) {
752+
* main( 'beep', opts, function benchmark( b ) {
749753
* var x;
750754
* var i;
751755
* b.tic();

0 commit comments

Comments
 (0)