mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-27 11:40:08 +08:00
lodash: changed _.isRegExp() method
This commit is contained in:
@@ -1168,6 +1168,12 @@ result = <boolean>_(undefined).isNaN();
|
||||
result = <boolean>_.isNative(Array.prototype.push);
|
||||
result = <boolean>_(Array.prototype.push).isNative();
|
||||
|
||||
// _.isRegExp
|
||||
result = <boolean>_.isRegExp(any);
|
||||
result = <boolean>_(1).isRegExp();
|
||||
result = <boolean>_<any>([]).isRegExp();
|
||||
result = <boolean>_({}).isRegExp();
|
||||
|
||||
// _.isTypedArray
|
||||
result = <boolean>_.isTypedArray([]);
|
||||
result = <boolean>_([]).isTypedArray();
|
||||
@@ -1427,8 +1433,6 @@ result = <boolean>_.isPlainObject(new Stooge('moe', 40));
|
||||
result = <boolean>_.isPlainObject([1, 2, 3]);
|
||||
result = <boolean>_.isPlainObject({ 'name': 'moe', 'age': 40 });
|
||||
|
||||
result = <boolean>_.isRegExp(/moe/);
|
||||
|
||||
result = <boolean>_.isString('moe');
|
||||
|
||||
result = <boolean>_.isUndefined(void 0);
|
||||
|
||||
Vendored
+17
-10
@@ -6160,6 +6160,23 @@ declare module _ {
|
||||
isNative(): boolean;
|
||||
}
|
||||
|
||||
//_.isRegExp
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is classified as a RegExp object.
|
||||
* @param value The value to check.
|
||||
* @return Returns true if value is correctly classified, else false.
|
||||
*/
|
||||
isRegExp(value?: any): boolean;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* see _.isRegExp
|
||||
*/
|
||||
isRegExp(): boolean;
|
||||
}
|
||||
|
||||
//_.isTypedArray
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -7036,16 +7053,6 @@ declare module _ {
|
||||
isPlainObject(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isRegExp
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is a regular expression.
|
||||
* @param value The value to check.
|
||||
* @return True if the value is a regular expression, else false.
|
||||
**/
|
||||
isRegExp(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isString
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user