mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added _.isString definition
This commit is contained in:
@@ -649,6 +649,8 @@ result = <boolean>_.isPlainObject({ 'name': 'moe', 'age': 40 });
|
||||
|
||||
result = <boolean>_.isRegExp(/moe/);
|
||||
|
||||
result = <boolean>_.isString('moe');
|
||||
|
||||
var mergeNames = {
|
||||
'stooges': [
|
||||
{ 'name': 'moe' },
|
||||
|
||||
Vendored
+8
-6
@@ -2481,6 +2481,13 @@ declare module _ {
|
||||
**/
|
||||
export function isRegExp(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Checks if value is a string.
|
||||
* @param value The value to check.
|
||||
* @return True if the value is a string, else false.
|
||||
**/
|
||||
export function isString(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Recursively merges own enumerable properties of the source object(s), that don't resolve
|
||||
* to undefined into the destination object. Subsequent sources will overwrite property
|
||||
@@ -2694,12 +2701,7 @@ declare module _ {
|
||||
**/
|
||||
export function tap<T>(object: T, intercepter: Function): T;
|
||||
|
||||
/**
|
||||
* Returns true if object is a String.
|
||||
* @param object Check if this object is a String.
|
||||
* @return True if `object` is a String, otherwise false.
|
||||
**/
|
||||
export function isString(object: any): boolean;
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if value is undefined.
|
||||
|
||||
Reference in New Issue
Block a user