mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of _.isEmpty have been changed
This commit is contained in:
Vendored
+11
-3
@@ -10432,19 +10432,27 @@ declare module _ {
|
||||
/**
|
||||
* Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or
|
||||
* jQuery-like collection with a length greater than 0 or an object with own enumerable properties.
|
||||
*
|
||||
* @param value The value to inspect.
|
||||
* @return Returns true if value is empty, else false.
|
||||
**/
|
||||
isEmpty(value?: any[]|Dictionary<any>|string|any): boolean;
|
||||
*/
|
||||
isEmpty(value?: any): boolean;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapperBase<T,TWrapper> {
|
||||
interface LoDashImplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.isEmpty
|
||||
*/
|
||||
isEmpty(): boolean;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.isEmpty
|
||||
*/
|
||||
isEmpty(): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
//_.isEqual
|
||||
interface IsEqualCustomizer {
|
||||
(value: any, other: any, indexOrKey?: number|string): boolean;
|
||||
|
||||
@@ -6574,12 +6574,26 @@ module TestIsElement {
|
||||
}
|
||||
|
||||
// _.isEmpty
|
||||
result = <boolean>_.isEmpty([1, 2, 3]);
|
||||
result = <boolean>_.isEmpty({});
|
||||
result = <boolean>_.isEmpty('');
|
||||
result = <boolean>_([1, 2, 3]).isEmpty();
|
||||
result = <boolean>_({}).isEmpty();
|
||||
result = <boolean>_('').isEmpty();
|
||||
module TestIsEmpty {
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
result = _.isEmpty(any);
|
||||
result = _(1).isEmpty();
|
||||
result = _('').isEmpty();
|
||||
result = _<any>([]).isEmpty();
|
||||
result = _({}).isEmpty();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<boolean>;
|
||||
|
||||
result = _(1).chain().isEmpty();
|
||||
result = _('').chain().isEmpty();
|
||||
result = _<any>([]).chain().isEmpty();
|
||||
result = _({}).chain().isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
// _.isEqual
|
||||
module TestIsEqual {
|
||||
|
||||
+20
-6
@@ -5894,12 +5894,26 @@ module TestIsElement {
|
||||
}
|
||||
|
||||
// _.isEmpty
|
||||
result = <boolean>_.isEmpty([1, 2, 3]);
|
||||
result = <boolean>_.isEmpty({});
|
||||
result = <boolean>_.isEmpty('');
|
||||
result = <boolean>_([1, 2, 3]).isEmpty();
|
||||
result = <boolean>_({}).isEmpty();
|
||||
result = <boolean>_('').isEmpty();
|
||||
module TestIsEmpty {
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
result = _.isEmpty(any);
|
||||
result = _(1).isEmpty();
|
||||
result = _('').isEmpty();
|
||||
result = _<any>([]).isEmpty();
|
||||
result = _({}).isEmpty();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<boolean>;
|
||||
|
||||
result = _(1).chain().isEmpty();
|
||||
result = _('').chain().isEmpty();
|
||||
result = _<any>([]).chain().isEmpty();
|
||||
result = _({}).chain().isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
// _.isEqual
|
||||
module TestIsEqual {
|
||||
|
||||
Vendored
+11
-3
@@ -10009,19 +10009,27 @@ declare module _ {
|
||||
/**
|
||||
* Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or
|
||||
* jQuery-like collection with a length greater than 0 or an object with own enumerable properties.
|
||||
*
|
||||
* @param value The value to inspect.
|
||||
* @return Returns true if value is empty, else false.
|
||||
**/
|
||||
isEmpty(value?: any[]|Dictionary<any>|string|any): boolean;
|
||||
*/
|
||||
isEmpty(value?: any): boolean;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapperBase<T,TWrapper> {
|
||||
interface LoDashImplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.isEmpty
|
||||
*/
|
||||
isEmpty(): boolean;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.isEmpty
|
||||
*/
|
||||
isEmpty(): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
//_.isEqual
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user