lodash: signatures of _.isEmpty have been changed

This commit is contained in:
Ilya Mochalov
2016-01-24 05:00:06 +05:00
parent 7fffbd3e04
commit 454a2cfaec
4 changed files with 62 additions and 18 deletions
+11 -3
View File
@@ -10432,19 +10432,27 @@ declare module _ {
/**
* Checks if value is empty. A value is considered empty unless its 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;
+20 -6
View File
@@ -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
View File
@@ -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 {
+11 -3
View File
@@ -10009,19 +10009,27 @@ declare module _ {
/**
* Checks if value is empty. A value is considered empty unless its 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 {
/**