Add Array.isArray typing. (#22738)

This commit is contained in:
NN
2018-01-17 23:21:40 +02:00
committed by Wesley Wigham
parent a2f2ed7c25
commit c84df1f831
2 changed files with 11 additions and 0 deletions

View File

@@ -83,6 +83,8 @@ arrayOfPoint3D = Array.from(arrayOfPoint, point => point3d, a);
arrayOfPoint3D = Array.from(iterableOfPoint, point => point3d);
arrayOfPoint3D = Array.from(iterableOfPoint, point => point3d, a);
arrayOfPoint = Array.of(point, point);
b = Array.isArray([]);
b = Array.isArray({});
// #############################################################################################
// ECMAScript 6: String & RegExp

View File

@@ -712,6 +712,7 @@ declare namespace core {
from<T, U>(arrayLike: ArrayLike<T> | Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
from<T>(arrayLike: ArrayLike<T> | Iterable<T>): T[];
of<T>(...items: T[]): T[];
isArray(arg: any): arg is Array<any>;
push<T>(array: ArrayLike<T>, ...items: T[]): number;
pop<T>(array: ArrayLike<T>): T;
concat<T>(array: ArrayLike<T>, ...items: Array<T[] | T>): T[];
@@ -1035,6 +1036,10 @@ declare module "core-js/fn/array/index-of" {
const indexOf: typeof core.Array.indexOf;
export = indexOf;
}
declare module "core-js/fn/array/is-array" {
const isArray: typeof core.Array.isArray;
export = isArray;
}
declare module "core-js/fn/array/join" {
const join: typeof core.Array.join;
export = join;
@@ -1814,6 +1819,10 @@ declare module "core-js/library/fn/array/index-of" {
const indexOf: typeof core.Array.indexOf;
export = indexOf;
}
declare module "core-js/library/fn/array/is-array" {
const isArray: typeof core.Array.isArray;
export = isArray;
}
declare module "core-js/library/fn/array/join" {
const join: typeof core.Array.join;
export = join;