Added _.isError function

This commit is contained in:
Daniel Furtado
2015-12-28 18:03:24 +01:00
parent 05774649a6
commit b8a88f3bba
+19
View File
@@ -1454,6 +1454,13 @@ interface UnderscoreStatic {
* @return True if `object` is a Function, otherwise false.
**/
isFunction(object: any): boolean;
/**
* Returns true if object inherits from an Error.
* @param object Check if this object is an Error.
* @return True if `object` is a Error, otherwise false.
**/
isError(object:any): boolean;
/**
* Returns true if object is a String.
@@ -2404,6 +2411,12 @@ interface Underscore<T> {
* @see _.isFunction
**/
isFunction(): boolean;
/**
* Wrapped type `object`.
* @see _.isError
**/
isError(): boolean;
/**
* Wrapped type `object`.
@@ -3299,6 +3312,12 @@ interface _Chain<T> {
**/
isFunction(): _Chain<T>;
/**
* Wrapped type `object`.
* @see _.isError
**/
isError(): _Chain<T>;
/**
* Wrapped type `object`.
* @see _.isString