diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 33068df115..0ff0fa62c1 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1221,6 +1221,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 df46733b29..f76ca23384 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6231,6 +6231,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 { /** @@ -7048,17 +7066,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;