From 8bd68489546133e9cc8faea510c653e6cb378579 Mon Sep 17 00:00:00 2001 From: Sing Date: Fri, 4 Aug 2023 21:53:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix=20typings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/helper/chunk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helper/chunk.ts b/src/helper/chunk.ts index 46b48f1..ed7b5a7 100644 --- a/src/helper/chunk.ts +++ b/src/helper/chunk.ts @@ -1,5 +1,5 @@ -export function chunk(items: any[], size: number) { - const chunks = []; +export function chunk(items: T[], size: number): T[][] { + const chunks: T[][] = []; for (let i = 0; i < items.length; i += size) { chunks.push(items.slice(i, i + size)); }