Fix to use more accurate types with custom isArray() and add lint (#5261)
* Fix to use more accurate types with custom isArray() * Add lint against Array.isArray()
This commit is contained in:
@ -11,6 +11,7 @@ export const uuidv4 = v4
|
||||
* A safer type guard for arrays since the built-in Array.isArray() asserts `any[]`.
|
||||
*/
|
||||
export function isArray(val: any): val is unknown[] {
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
return Array.isArray(val)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user