Add Array#includes and improve compatibility of Array#indexOf (#41)

This commit is contained in:
Igor
2018-03-17 17:02:15 +01:00
committed by Daniel Wirtz
parent 2dfd9aae3a
commit 162096bcd6
7 changed files with 1241 additions and 35 deletions

1
std/assembly.d.ts vendored
View File

@ -224,6 +224,7 @@ declare class Array<T> {
length: i32;
/** Constructs a new array. */
constructor(capacity?: i32);
includes(searchElement: T, fromIndex?: i32): bool;
indexOf(searchElement: T, fromIndex?: i32): i32;
lastIndexOf(searchElement: T, fromIndex?: i32): i32;
push(element: T): void;