Skip to content

Commit bd6e01d

Browse files
author
Conner Bachmann
committed
fix(array): returning types
1 parent a1cebb8 commit bd6e01d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Array.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ define(Array.prototype, {
5151
return Math.floor(Math.random() * this.length);
5252
},
5353

54-
insertRandom: function <T>(elem: T) {
54+
insertRandom: function <T>(elem: T): void {
5555
this.insert(elem, this.randomIndex());
5656
},
5757

@@ -215,7 +215,7 @@ declare global {
215215
* let a = [1,2,3,4,5];
216216
* a.insertRandom(27) // a = [1,2,3,27,4,5]
217217
*/
218-
insertRandom(elem: T): this;
218+
insertRandom(elem: T): void;
219219
/**
220220
* Returns the unique items of the array
221221
* @param {} predicate / condition
@@ -282,7 +282,7 @@ declare global {
282282
* let a = [1,2,3,4,5];
283283
* a.randomIndex() // 2 -> 3
284284
*/
285-
randomIndex(): this;
285+
randomIndex(): number;
286286
}
287287
}
288288

0 commit comments

Comments
 (0)