From 76bd7050919e19a6f96e51e3c651d755620961bb Mon Sep 17 00:00:00 2001 From: masx200 <34191203+masx200@users.noreply.github.com> Date: Tue, 13 Dec 2022 09:18:44 +0800 Subject: [PATCH] Update index.ts --- shuffle-string/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/shuffle-string/index.ts b/shuffle-string/index.ts index 47638f8f..4d28a7a1 100644 --- a/shuffle-string/index.ts +++ b/shuffle-string/index.ts @@ -1,6 +1,7 @@ export default function restoreString(s: string, indices: number[]): string { //@ts-ignore return Array.prototype.reduce +//@ts-ignore .call(s, (p, c, i) => ((p[indices[i]] = c), p), [...s]) .join(""); }