From e0cb412cc97a98602836d8d2054e7ed8b5d3ca13 Mon Sep 17 00:00:00 2001 From: ssi02014 Date: Sun, 16 Jun 2024 15:50:10 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20partition=20interface=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/utils/array/partition.md | 2 +- packages/utils/src/array/partition/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/utils/array/partition.md b/docs/docs/utils/array/partition.md index dac04994a..b7d416c2a 100644 --- a/docs/docs/utils/array/partition.md +++ b/docs/docs/utils/array/partition.md @@ -10,7 +10,7 @@ ## Interface ```ts title="typescript" const partition: ( - arr: readonly T[] | T[], + arr: T[] | readonly T[], predicate: (item: T) => boolean ) => [truthyArray: T[], falsyArray: T[]]; ``` diff --git a/packages/utils/src/array/partition/index.ts b/packages/utils/src/array/partition/index.ts index eddf62cbb..f903ceacd 100644 --- a/packages/utils/src/array/partition/index.ts +++ b/packages/utils/src/array/partition/index.ts @@ -1,5 +1,5 @@ export const partition = ( - arr: T[] | ReadonlyArray, + arr: T[] | readonly T[], predicate: (item: T) => boolean ): [truthyArray: T[], falsyArray: T[]] => { const truthyArray: T[] = [];