summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/shuffle.ts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-10-31 13:46:42 +0900
committerGitHub <noreply@github.com>2024-10-31 13:46:42 +0900
commit17d9aca5a7ec6149a8dbf0c1607c81ab188e7015 (patch)
tree78752526e76f518be29ebe5bdbd0176cd2087796 /packages/frontend/src/scripts/shuffle.ts
parentfix(frontend): 一部のノート表示で設定にかかわらずセンシ... (diff)
downloadsharkey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.tar.gz
sharkey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.tar.bz2
sharkey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.zip
refactor(frontend): asとanyをすぐなおせる範囲で除去 (#14848)
* refactor(frontend): できるだけanyを除去 * refactor * lint * fix * remove unused * Update packages/frontend/src/components/MkReactionsViewer.details.vue * Update packages/frontend/src/components/MkUsersTooltip.vue --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/scripts/shuffle.ts')
-rw-r--r--packages/frontend/src/scripts/shuffle.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/shuffle.ts b/packages/frontend/src/scripts/shuffle.ts
index fed16bc71c..1f6ef1928c 100644
--- a/packages/frontend/src/scripts/shuffle.ts
+++ b/packages/frontend/src/scripts/shuffle.ts
@@ -6,8 +6,9 @@
/**
* 配列をシャッフル (破壊的)
*/
-export function shuffle<T extends any[]>(array: T): T {
- let currentIndex = array.length, randomIndex;
+export function shuffle<T extends unknown[]>(array: T): T {
+ let currentIndex = array.length;
+ let randomIndex: number;
// While there remain elements to shuffle.
while (currentIndex !== 0) {