8000 Auto-generated commit · stdlib-js/array-base-setter@d0bef8c · GitHub
[go: up one dir, main page]

Skip to content

Commit d0bef8c

Browse files
committed
Auto-generated commit
1 parent 5cffe18 commit d0bef8c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Joey Reed <joeyrreed@gmail.com>
1616
Jordan-Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
1717
Joris Labie <joris.labie1@gmail.com>
1818
Justin Dennison <justin1dennison@gmail.com>
19+
KATTA NAGA NITHIN <88046362+nithinkatta@users.noreply.github.com>
1920
Marcus <mfantham@users.noreply.github.com>
2021
Matt Cochrane <matthew.cochrane.eng@gmail.com>
2122
Milan Raj <rajsite@users.noreply.github.com>

docs/types/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
// TypeScript Version: 2.0
19+
// TypeScript Version: 4.1
2020

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

@@ -110,7 +110,7 @@ type SetUint8c = ( arr: Uint8ClampedArray, idx: number, value: number ) => void;
110110
* @param idx - element index
111111
* @param value - value to set
112112
*/
113-
type SetGeneric = ( arr: Array<any>, idx: number, value: any ) => void;
113+
type SetGeneric<T> = ( arr: Array<T>, idx: number, value: T ) => void;
114114

115115
/**
116116
* Sets an element in an indexed array-like object.
@@ -119,7 +119,7 @@ type SetGeneric = ( arr: Array<any>, idx: number, value: any ) => void;
119119
* @param idx - element index
120120
* @param value - value to set
121121
*/
122-
type SetArrayLike = ( arr: Collection, idx: number, value: any ) => void;
122+
type SetArrayLike<T> = ( arr: Collection<T>, idx: number, value: T ) => void;
123123

124124
/**
125125
* Returns an accessor function for setting an element in a `Float64Array`.
@@ -307,7 +307,7 @@ declare function setter( dtype: 'uint8c' ): SetUint8c;
307307
* var v = arr[ 2 ];
308308
* // returns 3
309309
*/
310-
declare function setter( dtype: 'generic' ): SetGeneric;
310+
declare function setter( dtype: 'generic' ): SetGeneric<any>;
311311

312312
/**
313313
* Returns an accessor function for setting an element in an indexed array-like object.
@@ -326,7 +326,7 @@ declare function setter( dtype: 'generic' ): SetGeneric;
326326
* var v = arr[ 2 ];
327327
* // returns 3
328328
*/
329-
declare function setter( dtype: string ): SetArrayLike;
329+
declare function setter( dtype: string ): SetArrayLike<any>;
330330

331331

332332
// EXPORTS //

docs/types/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import setter = require( './index' );
3232
setter( 'uint16' ); // $ExpectType SetUint16
3333
setter( 'uint8' ); // $ExpectType SetUint8
3434
setter( 'uint8c' ); // $ExpectType SetUint8c
35-
setter( 'generic' ); // $ExpectType SetGeneric
36-
setter( 'foo' ); // $ExpectType SetArrayLike
35+
setter( 'generic' ); // $ExpectType SetGeneric<any>
36+
setter( 'foo' ); // $ExpectType SetArrayLike<any>
3737
}
3838

3939
// The compiler throws an error if the function is provided a first argument which is not a string...

0 commit comments

Comments
 (0)
0