mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of _.attempt have been changed
This commit is contained in:
Vendored
+3
-3
@@ -14183,21 +14183,21 @@ declare module _ {
|
||||
* @param func The function to attempt.
|
||||
* @return Returns the func result or error object.
|
||||
*/
|
||||
attempt<TResult>(func: (...args: any[]) => TResult): TResult|Error;
|
||||
attempt<TResult>(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.attempt
|
||||
*/
|
||||
attempt<TResult>(): TResult|Error;
|
||||
attempt<TResult>(...args: any[]): TResult|Error;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.attempt
|
||||
*/
|
||||
attempt<TResult>(): LoDashExplicitObjectWrapper<TResult|Error>;
|
||||
attempt<TResult>(...args: any[]): LoDashExplicitObjectWrapper<TResult|Error>;
|
||||
}
|
||||
|
||||
//_.callback
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-3
@@ -15653,21 +15653,21 @@ declare module _ {
|
||||
* @param func The function to attempt.
|
||||
* @return Returns the func result or error object.
|
||||
*/
|
||||
attempt<TResult>(func: (...args: any[]) => TResult, ...args): TResult|Error;
|
||||
attempt<TResult>(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.attempt
|
||||
*/
|
||||
attempt<TResult>(...args): TResult|Error;
|
||||
attempt<TResult>(...args: any[]): TResult|Error;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.attempt
|
||||
*/
|
||||
attempt<TResult>(...args): LoDashExplicitObjectWrapper<TResult|Error>;
|
||||
attempt<TResult>(...args: any[]): LoDashExplicitObjectWrapper<TResult|Error>;
|
||||
}
|
||||
|
||||
//_.constant
|
||||
|
||||
Reference in New Issue
Block a user