aboutsummaryrefslogtreecommitdiff
path: root/src/modules/word
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-11-04 10:40:06 +0100
committerGitHub <[email protected]>2023-11-04 09:40:06 +0000
commit358572d9e76f4cd22bfcb09c092a1eaf3a31f005 (patch)
tree836d9b14d2c7e338610dc36073e799a7723af8c8 /src/modules/word
parent22003bbac9518befeaacfc75c9360a273f0ea6b4 (diff)
downloadfaker-358572d9e76f4cd22bfcb09c092a1eaf3a31f005.tar.xz
faker-358572d9e76f4cd22bfcb09c092a1eaf3a31f005.zip
infra(typescript-eslint): strict-type-checked (#2467)
Diffstat (limited to 'src/modules/word')
-rw-r--r--src/modules/word/filter-word-list-by-length.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/word/filter-word-list-by-length.ts b/src/modules/word/filter-word-list-by-length.ts
index 106e9858..60c6fae9 100644
--- a/src/modules/word/filter-word-list-by-length.ts
+++ b/src/modules/word/filter-word-list-by-length.ts
@@ -13,12 +13,12 @@ const STRATEGIES = {
wordList: ReadonlyArray<string>,
length: { min: number; max: number }
): string[] => {
- const wordsByLength = wordList.reduce(
+ const wordsByLength = wordList.reduce<Record<number, string[]>>(
(data, word) => {
(data[word.length] = data[word.length] ?? []).push(word);
return data;
},
- {} as Record<number, string[]>
+ {}
);
const lengths = Object.keys(wordsByLength).map(Number);