Skip to content

Commit 4623339

Browse files
authored
feat: update namespace TypeScript declarations
PR-URL: #6275 Reviewed-by: Athan Reines <[email protected]>
1 parent 9d448eb commit 4623339

File tree

1 file changed

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

1 file changed

+33
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import everyByRight = require( '@stdlib/array/base/every-by-right' );
8585
import fancySlice = require( '@stdlib/array/base/fancy-slice' );
8686
import fancySliceAssign = require( '@stdlib/array/base/fancy-slice-assign' );
8787
import fill = require( '@stdlib/array/base/fill' );
88+
import fillBy = require( '@stdlib/array/base/fill-by' );
8889
import filled = require( '@stdlib/array/base/filled' );
8990
import filledBy = require( '@stdlib/array/base/filled-by' );
9091
import filled2d = require( '@stdlib/array/base/filled2d' );
@@ -1947,6 +1948,38 @@ interface Namespace {
19471948
*/
19481949
fill: typeof fill;
19491950

1951+
/**
1952+
* Fills all elements within a portion of an array according to a provided callback function.
1953+
*
1954+
* @param x - input array
1955+
* @param start - starting index (inclusive)
1956+
* @param end - ending index (exclusive)
1957+
* @param fcn - callback function
1958+
* @param thisArg - callback function execution context
1959+
* @returns modified input array
1960+
*
1961+
* @example
1962+
* function fcn() {
1963+
* return 4;
1964+
* }
1965+
*
1966+
* var x = [ 1, 2, 3 ];
1967+
*
1968+
* var out = ns.fillBy( x, 4, 0, 3 );
1969+
* // returns [ 4, 4, 4 ]
1970+
*
1971+
* @example
1972+
* function fcn() {
1973+
* return 8;
1974+
* }
1975+
*
1976+
* var x = [ 1, 2, 3, 4, 5, 6 ];
1977+
*
1978+
* var out = ns.fillBy( x, 8, 0, 3 );
1979+
* // returns [ 8, 8, 8, 4, 5, 6 ]
1980+
*/
1981+
fillBy: typeof fillBy;
1982+
19501983
/**
19511984
* Returns a filled "generic" array.
19521985
*

0 commit comments

Comments
 (0)