From debc05f547023733ccb2caf12c2eb6611f64c530 Mon Sep 17 00:00:00 2001 From: Boris Cherny Date: Tue, 11 Jul 2017 16:29:22 -0700 Subject: [PATCH] [lodash] Alias builtin ArrayLike to List --- types/lodash/index.d.ts | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index 172000d6b8..d74a4b5de5 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -385,13 +385,13 @@ declare namespace _ { interface LoDashImplicitObjectWrapperBase extends LoDashImplicitWrapperBase { } interface LoDashImplicitObjectWrapper extends LoDashImplicitObjectWrapperBase> { } - + interface LoDashImplicitNillableObjectWrapper extends LoDashImplicitObjectWrapperBase> { } interface LoDashExplicitObjectWrapperBase extends LoDashExplicitWrapperBase { } interface LoDashExplicitObjectWrapper extends LoDashExplicitObjectWrapperBase> { } - + interface LoDashExplicitNillableObjectWrapper extends LoDashExplicitObjectWrapperBase> { } interface LoDashImplicitArrayWrapperBase extends LoDashImplicitWrapperBase { @@ -6013,7 +6013,7 @@ declare namespace _ { * @see _.plant */ plant(value: T[]): LoDashImplicitArrayWrapper; - + /** * @see _.plant */ @@ -6055,7 +6055,7 @@ declare namespace _ { * @see _.plant */ plant(value: T[]): LoDashExplicitArrayWrapper; - + /** * @see _.plant */ @@ -6566,7 +6566,7 @@ declare namespace _ { collection: string | null | undefined, iteratee?: ListIterator ): string | null | undefined; - + /** * @see _.forEachRight */ @@ -7568,7 +7568,7 @@ declare namespace _ { collection: T, iteratee?: ObjectIterator ): T; - + /** * @see _.forEach */ @@ -12085,17 +12085,17 @@ declare namespace _ { * // => false */ isArrayLike(value: T & string & number): boolean; // should only match if T = any - + /** * @see _.isArrayLike */ isArrayLike(value?: Function): value is never; - + /** * @see _.isArrayLike */ isArrayLike(value: T | Function): value is T & { length: number }; - + /** * DEPRECATED */ @@ -12143,17 +12143,17 @@ declare namespace _ { * // => false */ isArrayLikeObject(value: T & string & number): boolean; // should only match if T = any - + /** * @see _.isArrayLike */ isArrayLikeObject(value?: Function | string | boolean | number): value is never; - + /** * @see _.isArrayLike */ isArrayLikeObject(value: T | Function | string | boolean | number): value is T & { length: number }; - + /** * DEPRECATED */ @@ -14016,7 +14016,7 @@ declare namespace _ { * @see _.multiply */ multiply(multiplicand: number): LoDashExplicitWrapper; - } + } //_.round interface LoDashStatic { @@ -19977,11 +19977,8 @@ declare namespace _ { type MemoVoidArrayIterator = (acc: TResult, curr: T, index: number, arr: T[]) => void; type MemoVoidDictionaryIterator = (acc: TResult, curr: T, key: string, dict: Dictionary) => void; - // Common interface between Arrays and jQuery objects - interface List { - [index: number]: T; - length: number; - } + /** Common interface between Arrays and jQuery objects */ + type List = ArrayLike interface Dictionary { [index: string]: T;