Update index.ts
This commit is contained in:
parent
d77be18d42
commit
b177d02e3a
1 changed files with 3 additions and 4 deletions
|
|
@ -1149,11 +1149,10 @@ export function assertArray<T = unknown>(value: unknown, assertion?: (element: u
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assertion) {
|
if (assertion) {
|
||||||
// eslint-disable-next-line unicorn/no-array-for-each
|
for (const element of value) {
|
||||||
value.forEach(v => {
|
|
||||||
// @ts-expect-error: "Assertions require every name in the call target to be declared with an explicit type annotation."
|
// @ts-expect-error: "Assertions require every name in the call target to be declared with an explicit type annotation."
|
||||||
assertion(v, message);
|
assertion(element, message);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue