Add ReadonlyArray<T>.includes to es2016.array.include.d.ts

This commit is contained in:
Aluan Haddad 2016-12-05 18:25:45 -05:00
parent 71fc58197c
commit ee0894339d

View File

@ -7,6 +7,15 @@ interface Array<T> {
includes(searchElement: T, fromIndex?: number): boolean;
}
interface ReadonlyArray<T> {
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
includes(searchElement: T, fromIndex?: number): boolean;
}
interface Int8Array {
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.