From 587f3db209902fec7c51879d7523ce2c0dc333ab Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Sep 2024 21:09:52 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 1 + base/accessor-getter/docs/types/test.ts | 5 ++--- base/accessors/docs/types/test.ts | 10 ++++------ base/arraylike2object/docs/types/test.ts | 10 ++++------ base/docs/types/index.d.ts | 4 ++-- base/filled2d-by/docs/types/index.d.ts | 1 - base/filled3d-by/docs/types/index.d.ts | 1 - base/filled4d-by/docs/types/index.d.ts | 1 - base/filled4d/docs/types/index.d.ts | 1 - base/filled5d-by/docs/types/index.d.ts | 1 - base/filled5d/docs/types/index.d.ts | 1 - base/flatten-by/docs/types/test.ts | 2 +- base/flatten2d-by/docs/types/test.ts | 2 +- base/flatten3d-by/docs/types/test.ts | 2 +- base/flatten4d-by/docs/types/test.ts | 2 +- base/flatten5d-by/docs/types/test.ts | 2 +- base/from-strided/docs/types/test.ts | 2 +- base/logspace/docs/types/index.d.ts | 2 +- base/mskreject-map/docs/types/test.ts | 12 ++++++++++++ base/zerosnd/docs/types/index.d.ts | 1 - complex128/docs/types/index.d.ts | 6 +++--- filled-by/docs/types/test.ts | 24 ++++++++++++------------ from-iterator/docs/types/index.d.ts | 2 +- from-scalar/docs/types/index.d.ts | 4 ---- nans-like/docs/types/index.d.ts | 6 +++--- to-view-iterator/docs/types/index.d.ts | 2 +- 26 files changed, 52 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59067bfd..16cc44a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -649,6 +649,7 @@ A total of 7 people contributed to this release. Thank you to the following cont
+- [`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)_ diff --git a/base/accessor-getter/docs/types/test.ts b/base/accessor-getter/docs/types/test.ts index 995c1057..d0d56816 100644 --- a/base/accessor-getter/docs/types/test.ts +++ b/base/accessor-getter/docs/types/test.ts @@ -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 { - let arr: AccessorArrayLike; - arr = { + const arr: AccessorArrayLike = { '0': 1, '1': 2, '2': 3, diff --git a/base/accessors/docs/types/test.ts b/base/accessors/docs/types/test.ts index 7c9a8023..39f21bac 100644 --- a/base/accessors/docs/types/test.ts +++ b/base/accessors/docs/types/test.ts @@ -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 { - let arr: AccessorArrayLike; - arr = { + const arr: AccessorArrayLike = { '0': 1, '1': 2, '2': 3, @@ -49,11 +48,10 @@ function accessorArray(): AccessorArrayLike { /** * Returns an array-like object. * -* @return array-like object +* @returns array-like object */ function arrayLike(): ArrayLike { - let arr: ArrayLike; - arr = { + const arr: ArrayLike = { '0': 1, '1': 2, '2': 3, diff --git a/base/arraylike2object/docs/types/test.ts b/base/arraylike2object/docs/types/test.ts index 7556a526..45e7fd18 100644 --- a/base/arraylike2object/docs/types/test.ts +++ b/base/arraylike2object/docs/types/test.ts @@ -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 { - let arr: AccessorArrayLike; - arr = { + const arr: AccessorArrayLike = { '0': 1, '1': 2, '2': 3, @@ -49,11 +48,10 @@ function accessorArray(): AccessorArrayLike { /** * Returns an array-like object. * -* @return array-like object +* @returns array-like object */ function arrayLike(): ArrayLike { - let arr: ArrayLike; - arr = { + const arr: ArrayLike = { '0': 1, '1': 2, '2': 3, diff --git a/base/docs/types/index.d.ts b/base/docs/types/index.d.ts index 18c6e6b2..a2ce9ef2 100644 --- a/base/docs/types/index.d.ts +++ b/base/docs/types/index.d.ts @@ -284,7 +284,7 @@ interface Namespace { * '2': 3, * '4': 4, * 'length': 4 - }; + * }; * var obj = ns.accessors( x ); * // returns {...} * @@ -385,7 +385,7 @@ interface Namespace { * '2': 3, * '4': 4, * 'length': 4 - }; + * }; * var obj = ns.arraylike2object( x ); * // returns {...} * diff --git a/base/filled2d-by/docs/types/index.d.ts b/base/filled2d-by/docs/types/index.d.ts index 32fcda94..932d4885 100644 --- a/base/filled2d-by/docs/types/index.d.ts +++ b/base/filled2d-by/docs/types/index.d.ts @@ -20,7 +20,6 @@ /// -import { Collection } from '@stdlib/types/array'; import { Shape2D } from '@stdlib/types/ndarray'; /** diff --git a/base/filled3d-by/docs/types/index.d.ts b/base/filled3d-by/docs/types/index.d.ts index 6452032d..4877dd96 100644 --- a/base/filled3d-by/docs/types/index.d.ts +++ b/base/filled3d-by/docs/types/index.d.ts @@ -20,7 +20,6 @@ /// -import { Collection } from '@stdlib/types/array'; import { Shape3D } from '@stdlib/types/ndarray'; /** diff --git a/base/filled4d-by/docs/types/index.d.ts b/base/filled4d-by/docs/types/index.d.ts index eb835f2b..12fa1a1d 100644 --- a/base/filled4d-by/docs/types/index.d.ts +++ b/base/filled4d-by/docs/types/index.d.ts @@ -20,7 +20,6 @@ /// -import { Collection } from '@stdlib/types/array'; import { Shape4D } from '@stdlib/types/ndarray'; /** diff --git a/base/filled4d/docs/types/index.d.ts b/base/filled4d/docs/types/index.d.ts index c7877f18..8f2f06de 100644 --- a/base/filled4d/docs/types/index.d.ts +++ b/base/filled4d/docs/types/index.d.ts @@ -20,7 +20,6 @@ /// -import { Collection } from '@stdlib/types/array'; import { Shape4D } from '@stdlib/types/ndarray'; /** diff --git a/base/filled5d-by/docs/types/index.d.ts b/base/filled5d-by/docs/types/index.d.ts index d5934f16..1850dbe7 100644 --- a/base/filled5d-by/docs/types/index.d.ts +++ b/base/filled5d-by/docs/types/index.d.ts @@ -20,7 +20,6 @@ /// -import { Collection } from '@stdlib/types/array'; import { Shape5D } from '@stdlib/types/ndarray'; /** diff --git a/base/filled5d/docs/types/index.d.ts b/base/filled5d/docs/types/index.d.ts index dc46713a..865386ff 100644 --- a/base/filled5d/docs/types/index.d.ts +++ b/base/filled5d/docs/types/index.d.ts @@ -20,7 +20,6 @@ /// -import { Collection } from '@stdlib/types/array'; import { Shape5D } from '@stdlib/types/ndarray'; /** diff --git a/base/flatten-by/docs/types/test.ts b/base/flatten-by/docs/types/test.ts index 65e81be6..fe3bccd1 100644 --- a/base/flatten-by/docs/types/test.ts +++ b/base/flatten-by/docs/types/test.ts @@ -21,7 +21,7 @@ import flattenBy = require( './index' ); /** * Identity function. * -* @param v - input value +* @param value - input value * @returns input value */ function identity( value: T ): T { diff --git a/base/flatten2d-by/docs/types/test.ts b/base/flatten2d-by/docs/types/test.ts index f31305d7..1d4e2b93 100644 --- a/base/flatten2d-by/docs/types/test.ts +++ b/base/flatten2d-by/docs/types/test.ts @@ -21,7 +21,7 @@ import flatten2dBy = require( './index' ); /** * Identity function. * -* @param v - input value +* @param value - input value * @returns input value */ function identity( value: T ): T { diff --git a/base/flatten3d-by/docs/types/test.ts b/base/flatten3d-by/docs/types/test.ts index 7da978ea..968601de 100644 --- a/base/flatten3d-by/docs/types/test.ts +++ b/base/flatten3d-by/docs/types/test.ts @@ -21,7 +21,7 @@ import flatten3dBy = require( './index' ); /** * Identity function. * -* @param v - input value +* @param value - input value * @returns input value */ function identity( value: T ): T { diff --git a/base/flatten4d-by/docs/types/test.ts b/base/flatten4d-by/docs/types/test.ts index 81a42dc7..3161da12 100644 --- a/base/flatten4d-by/docs/types/test.ts +++ b/base/flatten4d-by/docs/types/test.ts @@ -21,7 +21,7 @@ import flatten4dBy = require( './index' ); /** * Identity function. * -* @param v - input value +* @param value - input value * @returns input value */ function identity( value: T ): T { diff --git a/base/flatten5d-by/docs/types/test.ts b/base/flatten5d-by/docs/types/test.ts index 2631e7fe..d7fc9785 100644 --- a/base/flatten5d-by/docs/types/test.ts +++ b/base/flatten5d-by/docs/types/test.ts @@ -21,7 +21,7 @@ import flatten5dBy = require( './index' ); /** * Identity function. * -* @param v - input value +* @param value - input value * @returns input value */ function identity( value: T ): T { diff --git a/base/from-strided/docs/types/test.ts b/base/from-strided/docs/types/test.ts index 279144ac..01541c16 100644 --- a/base/from-strided/docs/types/test.ts +++ b/base/from-strided/docs/types/test.ts @@ -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 + 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... diff --git a/base/logspace/docs/types/index.d.ts b/base/logspace/docs/types/index.d.ts index 70554668..bc3fbd6b 100644 --- a/base/logspace/docs/types/index.d.ts +++ b/base/logspace/docs/types/index.d.ts @@ -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; +declare function logspace( a: number, b: number, len: number ): Array; // EXPORTS // diff --git a/base/mskreject-map/docs/types/test.ts b/base/mskreject-map/docs/types/test.ts index e74d7981..9a8b6104 100644 --- a/base/mskreject-map/docs/types/test.ts +++ b/base/mskreject-map/docs/types/test.ts @@ -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; } diff --git a/base/zerosnd/docs/types/index.d.ts b/base/zerosnd/docs/types/index.d.ts index 1519d737..6ac1768b 100644 --- a/base/zerosnd/docs/types/index.d.ts +++ b/base/zerosnd/docs/types/index.d.ts @@ -20,7 +20,6 @@ /// -import { Collection } from '@stdlib/types/array'; import { Shape } from '@stdlib/types/ndarray'; /** diff --git a/complex128/docs/types/index.d.ts b/complex128/docs/types/index.d.ts index 9fcfc1c1..babe3c9f 100644 --- a/complex128/docs/types/index.d.ts +++ b/complex128/docs/types/index.d.ts @@ -22,7 +22,7 @@ /// -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' ); @@ -38,7 +38,7 @@ interface LocaleOptions { * Configuration property. */ [ key: string | symbol | number ]: T | undefined; -}; +} /** * Callback invoked for each element in a source object. @@ -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. diff --git a/filled-by/docs/types/test.ts b/filled-by/docs/types/test.ts index 394ac496..bb876ed2 100644 --- a/filled-by/docs/types/test.ts +++ b/filled-by/docs/types/test.ts @@ -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... diff --git a/from-iterator/docs/types/index.d.ts b/from-iterator/docs/types/index.d.ts index ff51f436..a9166411 100644 --- a/from-iterator/docs/types/index.d.ts +++ b/from-iterator/docs/types/index.d.ts @@ -20,7 +20,7 @@ /// -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: diff --git a/from-scalar/docs/types/index.d.ts b/from-scalar/docs/types/index.d.ts index dcc45a44..8c5aa038 100644 --- a/from-scalar/docs/types/index.d.ts +++ b/from-scalar/docs/types/index.d.ts @@ -212,7 +212,6 @@ declare function scalar2array( 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 @@ -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 @@ -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 @@ -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 diff --git a/nans-like/docs/types/index.d.ts b/nans-like/docs/types/index.d.ts index 47352fd0..79522c1a 100644 --- a/nans-like/docs/types/index.d.ts +++ b/nans-like/docs/types/index.d.ts @@ -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`. * @@ -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`. * @@ -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`. * diff --git a/to-view-iterator/docs/types/index.d.ts b/to-view-iterator/docs/types/index.d.ts index 8d845c88..ed9929a9 100644 --- a/to-view-iterator/docs/types/index.d.ts +++ b/to-view-iterator/docs/types/index.d.ts @@ -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;