Skip to content

Commit

Permalink
Make isArrayLike a type guard for ArrayLike<T>
Browse files Browse the repository at this point in the history
Co-authored-by: Gago <xeroice@gmail.com>
  • Loading branch information
kamilkisiela and gagoar committed Apr 10, 2022
1 parent fbb2bee commit aae00da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -444,7 +444,7 @@ function getValidCacheMap<K, V, C>(
}

// Private
function isArrayLike(x: any): boolean {
function isArrayLike<T>(x: any): x is ArrayLike<T> {
return (
typeof x === 'object' &&
x !== null &&
Expand Down

0 comments on commit aae00da

Please sign in to comment.