From f8e3b34ad9f40efd0ef8496158633569434106c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Musa=20Karaka=C5=9F?= Date: Thu, 6 Aug 2015 11:22:41 +0300 Subject: [PATCH] lodash #5244 join/pop/shift do not return wrappers _([1, 2]).join() // "1,2" _([1, 2]).pop() // 2 _([1, 2]).shift() // 1 --- lodash/lodash-tests.ts | 6 +++--- lodash/lodash.d.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 14efc9c00..aee658f4d 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -114,11 +114,11 @@ result = <_.LoDashObjectWrapper<_.Dictionary>>_(<{ [index: string]: stri //Wrapped array shortcut methods result = <_.LoDashArrayWrapper>_([1, 2, 3, 4]).concat(5, 6); -result = <_.LoDashWrapper>_([1, 2, 3, 4]).join(','); -result = <_.LoDashWrapper>_([1, 2, 3, 4]).pop(); +result = _([1, 2, 3, 4]).join(','); +result = _([1, 2, 3, 4]).pop(); _([1, 2, 3, 4]).push(5, 6, 7); result = <_.LoDashArrayWrapper>_([1, 2, 3, 4]).reverse(); -result = <_.LoDashWrapper>_([1, 2, 3, 4]).shift(); +result = _([1, 2, 3, 4]).shift(); result = <_.LoDashArrayWrapper>_([1, 2, 3, 4]).slice(1, 2); result = <_.LoDashArrayWrapper>_([1, 2, 3, 4]).slice(2); result = <_.LoDashArrayWrapper>_([1, 2, 3, 4]).sort((a, b) => 1); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index ea93f2e70..c5602884d 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -219,11 +219,11 @@ declare module _ { interface LoDashArrayWrapper extends LoDashWrapperBase> { concat(...items: T[]): LoDashArrayWrapper; - join(seperator?: string): LoDashWrapper; - pop(): LoDashWrapper; + join(seperator?: string): string; + pop(): T; push(...items: T[]): void; reverse(): LoDashArrayWrapper; - shift(): LoDashWrapper; + shift(): T; slice(start: number, end?: number): LoDashArrayWrapper; sort(compareFn?: (a: T, b: T) => number): LoDashArrayWrapper; splice(start: number): LoDashArrayWrapper;