Skip to content

Commit cd14ed3

Browse files
stdlib-botkgryte
andauthored
feat: update namespace TypeScript declarations
PR-URL: stdlib-js#2402 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com> Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
1 parent de50d0a commit cd14ed3

File tree

1 file changed

+33
-0
lines changed
  • lib/node_modules/@stdlib/array/docs/types

1 file changed

+33
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import ones = require( '@stdlib/array/ones' );
6666
import onesLike = require( '@stdlib/array/ones-like' );
6767
import typedarraypool = require( '@stdlib/array/pool' );
6868
import promotionRules = require( '@stdlib/array/promotion-rules' );
69+
import put = require( '@stdlib/array/put' );
6970
import typedarrayReviver = require( '@stdlib/array/reviver' );
7071
import safeCasts = require( '@stdlib/array/safe-casts' );
7172
import sameKindCasts = require( '@stdlib/array/same-kind-casts' );
@@ -1169,6 +1170,38 @@ interface Namespace {
11691170
*/
11701171
promotionRules: typeof promotionRules;
11711172

1173+
/**
1174+
* Replaces specified elements of an array with provided values.
1175+
*
1176+
* @param x - input array
1177+
* @param indices - list of element indices
1178+
* @param values - values to set
1179+
* @param options - function options
1180+
* @returns input array
1181+
*
1182+
* @example
1183+
* var x = [ 1, 2, 3, 4 ];
1184+
*
1185+
* var indices = [ 1, 2 ];
1186+
* var values = [ 20, 30 ];
1187+
*
1188+
* var out = ns.put( x, indices, values );
1189+
* // returns [ 1, 20, 30, 4 ]
1190+
*
1191+
* var bool = ( out === x );
1192+
* // returns true
1193+
*
1194+
* @example
1195+
* var x = [ 1, 2, 3, 4 ];
1196+
*
1197+
* var out = ns.put( x, [ 1, 2 ], [ 30 ] );
1198+
* // returns [ 1, 30, 30, 4 ]
1199+
*
1200+
* var bool = ( out === x );
1201+
* // returns true
1202+
*/
1203+
put: typeof put;
1204+
11721205
/**
11731206
* Revives a JSON-serialized typed array.
11741207
*

0 commit comments

Comments
 (0)