From ac5487ad224705c215855ffd0fd322ba8c52d7f9 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Mon, 24 Aug 2015 00:33:26 +0500 Subject: [PATCH] lodash: changed _.isError() method --- lodash/lodash-tests.ts | 6 ++++++ lodash/lodash.d.ts | 29 ++++++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 00ca144fd2..80f6f72aec 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1209,6 +1209,12 @@ result = _([1, 2, 3]).isEmpty(); result = _({}).isEmpty(); result = _('').isEmpty(); +// _.isError +result = _.isError(any); +result = _(1).isError(); +result = _([]).isError(); +result = _({}).isError(); + // _.isFinite result = _.isFinite(any); result = _(1).isFinite(); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 77daeca2a1..cbd802e78c 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6197,6 +6197,24 @@ declare module _ { isEmpty(): boolean; } + //_.isError + interface LoDashStatic { + /** + * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError + * object. + * @param value The value to check. + * @return Returns true if value is an error object, else false. + */ + isError(value: any): boolean; + } + + interface LoDashWrapperBase { + /** + * @see _.isError + */ + isError(): boolean; + } + //_.isFinite interface LoDashStatic { /** @@ -6999,17 +7017,6 @@ declare module _ { isElement(value?: any): boolean; } - //_.isError - interface LoDashStatic { - /** - * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, - * or URIError object. - * @param value The value to check. - * @return True if value is an error object, else false. - */ - isError(value: any): boolean; - } - //_.isEqual interface EqCustomizer { (value: any, other: any, indexOrKey?: number|string): boolean;