Skip to content

Commit 68f3b04

Browse files
authored
docs: update utils TypeScript declarations
PR-URL: #8883 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent d2b02fe commit 68f3b04

File tree

1 file changed

+19
-12
lines changed
  • lib/node_modules/@stdlib/utils/docs/types

1 file changed

+19
-12
lines changed

lib/node_modules/@stdlib/utils/docs/types/index.d.ts

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ interface Namespace {
21562156
* var obj = {'a':{'b':{'c':'d'}}};
21572157
*
21582158
* var out = flatten( obj );
2159-
* // returns {'a|b':{'c':'d'}}
2159+
* // returns {'a|b|c':'d'}
21602160
*/
21612161
flattenObject: typeof flattenObject;
21622162

@@ -3256,23 +3256,30 @@ interface Namespace {
32563256
* @returns function wrapper
32573257
*
32583258
* @example
3259-
* function foo( a, b, c ) {
3260-
* return [ a, b, c ];
3261-
* }
3262-
*
32633259
* function clbk( v ) {
3264-
* this.count += 1;
32653260
* return v * 2;
32663261
* }
32673262
*
3268-
* var thisArg = { 'count': 0 };
3269-
* var bar = ns.mapArguments( foo, clbk, thisArg );
3263+
* function Foo() {
3264+
* this.x = 1;
3265+
* this.y = 2;
3266+
* }
32703267
*
3271-
* var out = bar( 1, 2, 3 );
3272-
* // returns [ 2, 4, 6 ]
3268+
* Foo.prototype.scale = function scale( a, b ) {
3269+
* return [ this.x*a, this.y*b ];
3270+
* };
32733271
*
3274-
* var count = thisArg.count;
3275-
* // returns 3
3272+
* var ctx = {
3273+
* 'x': 10,
3274+
* 'y': 20
3275+
* };
3276+
*
3277+
* var foo = new Foo();
3278+
*
3279+
* var bar = ns.mapArguments( foo.scale, clbk, ctx );
3280+
*
3281+
* var out = bar( 1, 2 );
3282+
* // returns [ 20, 80 ]
32763283
*/
32773284
mapArguments: typeof mapArguments;
32783285

0 commit comments

Comments
 (0)