From a2982405aaf07d29a931c35c4ba5ad6748d76f7f Mon Sep 17 00:00:00 2001 From: Owen Pearson Date: Thu, 5 Oct 2023 12:32:14 +0100 Subject: [PATCH] refactor: make arrEvery callback params non-optional --- src/common/lib/util/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/lib/util/utils.ts b/src/common/lib/util/utils.ts index 533daef412..c3e271839d 100644 --- a/src/common/lib/util/utils.ts +++ b/src/common/lib/util/utils.ts @@ -318,10 +318,10 @@ export const arrFilter = (Array.prototype.filter as unknown) }; export const arrEvery = (Array.prototype.every as unknown) - ? function (arr: Array, fn: (value: T, index?: number, arr?: Array) => boolean) { + ? function (arr: Array, fn: (value: T, index: number, arr: Array) => boolean) { return arr.every(fn); } - : function (arr: Array, fn: (value: T, index?: number, arr?: Array) => boolean) { + : function (arr: Array, fn: (value: T, index: number, arr: Array) => boolean) { const len = arr.length; for (let i = 0; i < len; i++) { if (!fn(arr[i], i, arr)) {