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 1da21e1 commit a113225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -448,7 +448,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 a113225

Please sign in to comment.