From 201d6e30f536c2c1f934270d2c97239522df1926 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Wed, 11 Oct 2023 20:44:51 +0200 Subject: infra(unicorn): no-array-for-each (#2461) --- scripts/apidoc/parameterDefaults.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/apidoc/parameterDefaults.ts b/scripts/apidoc/parameterDefaults.ts index 7e02afc6..34264b05 100644 --- a/scripts/apidoc/parameterDefaults.ts +++ b/scripts/apidoc/parameterDefaults.ts @@ -130,8 +130,7 @@ function patchSignatureParameterDefaults( throw new Error('Unexpected parameter length mismatch'); } - signatureParameters.forEach( - (param, index) => - (param.defaultValue = parameterDefaults[index] || param.defaultValue) - ); + for (const [index, param] of signatureParameters.entries()) { + param.defaultValue = parameterDefaults[index] || param.defaultValue; + } } -- cgit v1.2.3