Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Sep 28, 2024
1 parent 5eb1aa0 commit 587f3db
Show file tree
Hide file tree
Showing 26 changed files with 52 additions and 55 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ A total of 7 people contributed to this release. Thank you to the following cont

<details>

- [`abf0407`](https://github.com/stdlib-js/stdlib/commit/abf040787f6598438b0100a729a8331b7f80f62f) - **chore:** resolve lint errors in TS files _(by Philipp Burckhardt)_
- [`7f368f6`](https://github.com/stdlib-js/stdlib/commit/7f368f6c3f4cea444a304a62616cea36a5f143eb) - **fix:** remove unused imports from TS declaration file _(by Philipp Burckhardt)_
- [`975147f`](https://github.com/stdlib-js/stdlib/commit/975147f3125c786ec1672acb3d2564ca16eaa790) - **docs:** fix TSDoc lint errors _(by Philipp Burckhardt)_
- [`fbe6651`](https://github.com/stdlib-js/stdlib/commit/fbe6651766e6c9bf9dd941c08fbefb2cab03de1c) - **feat:** add `Float32ArrayLE` to namespace _(by Athan Reines)_
Expand Down
5 changes: 2 additions & 3 deletions base/accessor-getter/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ import getter = require( './index' );
/**
* Returns an array-like object supporting the get/set protocol.
*
* @return array-like object
* @returns array-like object
*/
function accessorArray(): AccessorArrayLike<number> {
let arr: AccessorArrayLike<number>;
arr = {
const arr: AccessorArrayLike<number> = {
'0': 1,
'1': 2,
'2': 3,
Expand Down
10 changes: 4 additions & 6 deletions base/accessors/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ import accessors = require( './index' );
/**
* Returns an array-like object supporting the get/set protocol.
*
* @return array-like object
* @returns array-like object
*/
function accessorArray(): AccessorArrayLike<number> {
let arr: AccessorArrayLike<number>;
arr = {
const arr: AccessorArrayLike<number> = {
'0': 1,
'1': 2,
'2': 3,
Expand All @@ -49,11 +48,10 @@ function accessorArray(): AccessorArrayLike<number> {
/**
* Returns an array-like object.
*
* @return array-like object
* @returns array-like object
*/
function arrayLike(): ArrayLike<number> {
let arr: ArrayLike<number>;
arr = {
const arr: ArrayLike<number> = {
'0': 1,
'1': 2,
'2': 3,
Expand Down
10 changes: 4 additions & 6 deletions base/arraylike2object/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ import arraylike2object = require( './index' );
/**
* Returns an array-like object supporting the get/set protocol.
*
* @return array-like object
* @returns array-like object
*/
function accessorArray(): AccessorArrayLike<number> {
let arr: AccessorArrayLike<number>;
arr = {
const arr: AccessorArrayLike<number> = {
'0': 1,
'1': 2,
'2': 3,
Expand All @@ -49,11 +48,10 @@ function accessorArray(): AccessorArrayLike<number> {
/**
* Returns an array-like object.
*
* @return array-like object
* @returns array-like object
*/
function arrayLike(): ArrayLike<number> {
let arr: ArrayLike<number>;
arr = {
const arr: ArrayLike<number> = {
'0': 1,
'1': 2,
'2': 3,
Expand Down
4 changes: 2 additions & 2 deletions base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ interface Namespace {
* '2': 3,
* '4': 4,
* 'length': 4
};
* };
* var obj = ns.accessors( x );
* // returns {...}
*
Expand Down Expand Up @@ -385,7 +385,7 @@ interface Namespace {
* '2': 3,
* '4': 4,
* 'length': 4
};
* };
* var obj = ns.arraylike2object( x );
* // returns {...}
*
Expand Down
1 change: 0 additions & 1 deletion base/filled2d-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/array';
import { Shape2D } from '@stdlib/types/ndarray';

/**
Expand Down
1 change: 0 additions & 1 deletion base/filled3d-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/array';
import { Shape3D } from '@stdlib/types/ndarray';

/**
Expand Down
1 change: 0 additions & 1 deletion base/filled4d-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/array';
import { Shape4D } from '@stdlib/types/ndarray';

/**
Expand Down
1 change: 0 additions & 1 deletion base/filled4d/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/array';
import { Shape4D } from '@stdlib/types/ndarray';

/**
Expand Down
1 change: 0 additions & 1 deletion base/filled5d-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/array';
import { Shape5D } from '@stdlib/types/ndarray';

/**
Expand Down
1 change: 0 additions & 1 deletion base/filled5d/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/array';
import { Shape5D } from '@stdlib/types/ndarray';

/**
Expand Down
2 changes: 1 addition & 1 deletion base/flatten-by/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import flattenBy = require( './index' );
/**
* Identity function.
*
* @param v - input value
* @param value - input value
* @returns input value
*/
function identity<T>( value: T ): T {
Expand Down
2 changes: 1 addition & 1 deletion base/flatten2d-by/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import flatten2dBy = require( './index' );
/**
* Identity function.
*
* @param v - input value
* @param value - input value
* @returns input value
*/
function identity<T>( value: T ): T {
Expand Down
2 changes: 1 addition & 1 deletion base/flatten3d-by/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import flatten3dBy = require( './index' );
/**
* Identity function.
*
* @param v - input value
* @param value - input value
* @returns input value
*/
function identity<T>( value: T ): T {
Expand Down
2 changes: 1 addition & 1 deletion base/flatten4d-by/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import flatten4dBy = require( './index' );
/**
* Identity function.
*
* @param v - input value
* @param value - input value
* @returns input value
*/
function identity<T>( value: T ): T {
Expand Down
2 changes: 1 addition & 1 deletion base/flatten5d-by/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import flatten5dBy = require( './index' );
/**
* Identity function.
*
* @param v - input value
* @param value - input value
* @returns input value
*/
function identity<T>( value: T ): T {
Expand Down
2 changes: 1 addition & 1 deletion base/from-strided/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import strided2array = require( './index' );
{
const x = [ 1.0, 2.0, 3.0, 4.0 ];

strided2array( x.length, x, 1, 0 ); // $ExpectType Array<number>
strided2array( x.length, x, 1, 0 ); // $ExpectType number[]
}

// The compiler throws an error if the function is provided a first argument which is not a number...
Expand Down
2 changes: 1 addition & 1 deletion base/logspace/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* var arr = logspace( 0, 2, 6 );
* // returns [ 1, ~2.5, ~6.31, ~15.85, ~39.81, 100 ]
*/
declare function logspace( x1: number, x2: number, len: number ): Array<number>;
declare function logspace( a: number, b: number, len: number ): Array<number>;


// EXPORTS //
Expand Down
12 changes: 12 additions & 0 deletions base/mskreject-map/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,22 @@ import mskrejectMap = require( './index' );

// FUNCTIONS //

/**
* Multiplies a value by two.
*
* @param val - input value
* @returns result
*/
function timesTwo( val: number ): number {
return val * 2;
}

/**
* Identity function.
*
* @param val - input value
* @returns input value
*/
function identity( val: string ): string {
return val;
}
Expand Down
1 change: 0 additions & 1 deletion base/zerosnd/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/array';
import { Shape } from '@stdlib/types/ndarray';

/**
Expand Down
6 changes: 3 additions & 3 deletions complex128/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/// <reference types="@stdlib/types"/>

import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter';
import { Iterator as Iter, IterableIterator, TypedIterator } from '@stdlib/types/iter';
import { ArrayLike, RealOrComplexTypedArray, Complex128Array as Complex128ArrayInterface } from '@stdlib/types/array';
import { ComplexLike, Complex128 } from '@stdlib/types/complex';
import ArrayBuffer = require( './../../../buffer' );
Expand All @@ -38,7 +38,7 @@ interface LocaleOptions<T = unknown> {
* Configuration property.
*/
[ key: string | symbol | number ]: T | undefined;
};
}

/**
* Callback invoked for each element in a source object.
Expand Down Expand Up @@ -1319,7 +1319,7 @@ declare class Complex128Array implements Complex128ArrayInterface {
* im = imag( z );
* // returns -3.0
*/
subarray( begin?: number, end?: number ): Complex64Array;
subarray( begin?: number, end?: number ): Complex128Array;

/**
* Serializes an array as a locale-specific string.
Expand Down
24 changes: 12 additions & 12 deletions filled-by/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ function clbk( i: number ): number {
filledarrayBy( it, 'uint8c', clbk, {} ); // $ExpectType ArrayOrTypedArray

const buf = new ArrayBuffer( 32 );
filledarrayBy( buf, clbk ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, clbk, {} ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, clbk ); // $ExpectType RealOrComplexTypedArray | BooleanArray
filledarrayBy( buf, clbk, {} ); // $ExpectType RealOrComplexTypedArray | BooleanArray

filledarrayBy( buf, 'uint32', clbk ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 'uint32', clbk, {} ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 'uint32', clbk ); // $ExpectType RealOrComplexTypedArray | BooleanArray
filledarrayBy( buf, 'uint32', clbk, {} ); // $ExpectType RealOrComplexTypedArray | BooleanArray

filledarrayBy( buf, 8, clbk ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, clbk, {} ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, clbk ); // $ExpectType RealOrComplexTypedArray | BooleanArray
filledarrayBy( buf, 8, clbk, {} ); // $ExpectType RealOrComplexTypedArray | BooleanArray

filledarrayBy( buf, 8, 'uint16', clbk ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, 'uint16', clbk, {} ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, 'uint16', clbk ); // $ExpectType RealOrComplexTypedArray | BooleanArray
filledarrayBy( buf, 8, 'uint16', clbk, {} ); // $ExpectType RealOrComplexTypedArray | BooleanArray

filledarrayBy( buf, 8, 2, clbk ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, 2, clbk, {} ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, 2, clbk ); // $ExpectType RealOrComplexTypedArray | BooleanArray
filledarrayBy( buf, 8, 2, clbk, {} ); // $ExpectType RealOrComplexTypedArray | BooleanArray

filledarrayBy( buf, 8, 2, 'int16', clbk ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, 2, 'int16', clbk, {} ); // $ExpectType RealOrComplexTypedArray
filledarrayBy( buf, 8, 2, 'int16', clbk ); // $ExpectType RealOrComplexTypedArray | BooleanArray
filledarrayBy( buf, 8, 2, 'int16', clbk, {} ); // $ExpectType RealOrComplexTypedArray | BooleanArray
}

// The compiler throws an error if a callback function argument is not a function...
Expand Down
2 changes: 1 addition & 1 deletion from-iterator/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { TypedIterator as Iter, TypedIterableIterator } from '@stdlib/types/iter';
import { TypedIterator as Iter } from '@stdlib/types/iter';
import { Collection } from '@stdlib/types/array';

// Define a union type representing both iterable and non-iterable iterators:
Expand Down
4 changes: 0 additions & 4 deletions from-scalar/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ declare function scalar2array<T = unknown>( value: T, dtype: 'generic' ): Array<
* Returns a single-element array containing a provided scalar value.
*
* @param value - scalar value
* @param dtype - output array data type
* @returns output array
*
* @example
Expand All @@ -225,7 +224,6 @@ declare function scalar2array( value: number ): Float64Array;
* Returns a single-element array containing a provided scalar value.
*
* @param value - scalar value
* @param dtype - output array data type
* @returns output array
*
* @example
Expand All @@ -238,7 +236,6 @@ declare function scalar2array( value: boolean ): BooleanArray;
* Returns a single-element array containing a provided scalar value.
*
* @param value - scalar value
* @param dtype - output array data type
* @returns output array
*
* @example
Expand All @@ -255,7 +252,6 @@ declare function scalar2array( value: Complex64 ): Complex64Array;
* Returns a single-element array containing a provided scalar value.
*
* @param value - scalar value
* @param dtype - output array data type
* @returns output array
*
* @example
Expand Down
6 changes: 3 additions & 3 deletions nans-like/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ declare function nansLike( x: AnyArray, dtype: 'complex128' ): Complex128Array;
/**
* Creates an array filled with NaNs and having the same length as a provided input array.
*
## Notes
* ## Notes
*
* - Each element of the returned array has a real component equal to `NaN` and an imaginary component equal to `NaN`.
*
Expand Down Expand Up @@ -188,7 +188,7 @@ declare function nansLike( x: Float32Array, dtype?: DataType ): Float32Array;
* - `complex64`: single-precision complex floating-point numbers
* - `generic`: generic JavaScript values
*
## Notes
* ## Notes
*
* - Each element of the returned array has a real component equal to `NaN` and an imaginary component equal to `NaN`.
*
Expand Down Expand Up @@ -218,7 +218,7 @@ declare function nansLike( x: Complex128Array, dtype?: DataType ): Complex128Arr
* - `complex64`: single-precision complex floating-point numbers
* - `generic`: generic JavaScript values
*
## Notes
* ## Notes
*
* - Each element of the returned array has a real component equal to `NaN` and an imaginary component equal to `NaN`.
*
Expand Down
2 changes: 1 addition & 1 deletion to-view-iterator/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type MapFunction = Nullary | Unary | Binary | Ternary;
* function fcn( v ) {
* return v * 10.0;
* }
*
* var iter = arrayview2iterator( [ 1, 2, 3, 4 ], fcn );
*
* var v = iter.next().value;
Expand Down

0 comments on commit 587f3db

Please sign in to comment.