From b8a88f3bbaecf9f0155c8898e1420af212bef0ea Mon Sep 17 00:00:00 2001 From: Daniel Furtado Date: Mon, 28 Dec 2015 18:03:24 +0100 Subject: [PATCH] Added _.isError function --- underscore/underscore.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index feca73688..bdb2bdedd 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -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 { * @see _.isFunction **/ isFunction(): boolean; + + /** + * Wrapped type `object`. + * @see _.isError + **/ + isError(): boolean; /** * Wrapped type `object`. @@ -3299,6 +3312,12 @@ interface _Chain { **/ isFunction(): _Chain; + /** + * Wrapped type `object`. + * @see _.isError + **/ + isError(): _Chain; + /** * Wrapped type `object`. * @see _.isString