Skip to content

Commit 819292a

Browse files
committed
Merge pull request DefinitelyTyped#6909 from chrootsu/lodash-isTypedArray
lodash: signatures of _.isTypedArray have been changed
2 parents 7237f96 + 31fb378 commit 819292a

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

lodash/lodash-tests.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5136,8 +5136,20 @@ result = <boolean>_({}).isString();
51365136
}
51375137

51385138
// _.isTypedArray
5139-
result = <boolean>_.isTypedArray([]);
5140-
result = <boolean>_([]).isTypedArray();
5139+
module TestIsTypedArray {
5140+
{
5141+
let result: boolean;
5142+
5143+
result = _.isTypedArray([]);
5144+
result = _([]).isTypedArray();
5145+
}
5146+
5147+
{
5148+
let result: _.LoDashExplicitWrapper<boolean>;
5149+
5150+
result = _([]).chain().isTypedArray();
5151+
}
5152+
}
51415153

51425154
// _.isUndefined
51435155
result = <boolean>_.isUndefined(any);

lodash/lodash.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9013,6 +9013,7 @@ declare module _ {
90139013
interface LoDashStatic {
90149014
/**
90159015
* Checks if value is classified as a typed array.
9016+
*
90169017
* @param value The value to check.
90179018
* @return Returns true if value is correctly classified, else false.
90189019
*/
@@ -9026,6 +9027,13 @@ declare module _ {
90269027
isTypedArray(): boolean;
90279028
}
90289029

9030+
interface LoDashExplicitWrapperBase<T, TWrapper> {
9031+
/**
9032+
* see _.isTypedArray
9033+
*/
9034+
isTypedArray(): LoDashExplicitWrapper<boolean>;
9035+
}
9036+
90299037
//_.isUndefined
90309038
interface LoDashStatic {
90319039
/**

0 commit comments

Comments
 (0)