From 0398bc0ebe75c7d2f154b395da39a1cacd3290e3 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Sun, 24 Jan 2016 05:23:54 +0500 Subject: [PATCH] lodash: signatures of _.attempt have been changed --- lodash/lodash-3.10.d.ts | 6 +++--- lodash/lodash-tests-3.10.ts | 3 +++ lodash/lodash.d.ts | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lodash/lodash-3.10.d.ts b/lodash/lodash-3.10.d.ts index c570cc11c..53c8415da 100644 --- a/lodash/lodash-3.10.d.ts +++ b/lodash/lodash-3.10.d.ts @@ -14183,21 +14183,21 @@ declare module _ { * @param func The function to attempt. * @return Returns the func result or error object. */ - attempt(func: (...args: any[]) => TResult): TResult|Error; + attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; } interface LoDashImplicitObjectWrapper { /** * @see _.attempt */ - attempt(): TResult|Error; + attempt(...args: any[]): TResult|Error; } interface LoDashExplicitObjectWrapper { /** * @see _.attempt */ - attempt(): LoDashExplicitObjectWrapper; + attempt(...args: any[]): LoDashExplicitObjectWrapper; } //_.callback diff --git a/lodash/lodash-tests-3.10.ts b/lodash/lodash-tests-3.10.ts index efe2e1b3e..a460cddb2 100644 --- a/lodash/lodash-tests-3.10.ts +++ b/lodash/lodash-tests-3.10.ts @@ -9239,13 +9239,16 @@ module TestAttempt { let result: {a: string}|Error; result = _.attempt<{a: string}>(func); + result = _.attempt<{a: string}>(func, 'foo', 'bar', 'baz'); result = _(func).attempt<{a: string}>(); + result = _(func).attempt<{a: string}>('foo', 'bar', 'baz'); } { let result: _.LoDashExplicitObjectWrapper<{a: string}|Error>; result = _(func).chain().attempt<{a: string}>(); + result = _(func).chain().attempt<{a: string}>('foo', 'bar', 'baz'); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index ddcb01fcb..a06a334bc 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -15653,21 +15653,21 @@ declare module _ { * @param func The function to attempt. * @return Returns the func result or error object. */ - attempt(func: (...args: any[]) => TResult, ...args): TResult|Error; + attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; } interface LoDashImplicitObjectWrapper { /** * @see _.attempt */ - attempt(...args): TResult|Error; + attempt(...args: any[]): TResult|Error; } interface LoDashExplicitObjectWrapper { /** * @see _.attempt */ - attempt(...args): LoDashExplicitObjectWrapper; + attempt(...args: any[]): LoDashExplicitObjectWrapper; } //_.constant