From e6d8d7f939f4ceb54615b1439d922ebf313b6f03 Mon Sep 17 00:00:00 2001 From: Jed Mao Date: Sat, 23 Jan 2016 10:20:58 -0600 Subject: [PATCH] Additional args in lodash.attempt --- lodash/lodash-tests.ts | 3 +++ lodash/lodash.d.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index af33b66ac3..9a3e91b5a0 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -9396,13 +9396,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 f9249d16bd..ddcb01fcb8 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): TResult|Error; + attempt(func: (...args: any[]) => TResult, ...args): TResult|Error; } interface LoDashImplicitObjectWrapper { /** * @see _.attempt */ - attempt(): TResult|Error; + attempt(...args): TResult|Error; } interface LoDashExplicitObjectWrapper { /** * @see _.attempt */ - attempt(): LoDashExplicitObjectWrapper; + attempt(...args): LoDashExplicitObjectWrapper; } //_.constant