aboutsummaryrefslogtreecommitdiff
path: root/scripts/apidoc
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-05-04 16:42:29 +0200
committerGitHub <[email protected]>2023-05-04 16:42:29 +0200
commit2e9ed960e3a11e4dcb78a434563fc04890c00c3d (patch)
tree566aa44b9bb085b8a42c6f211b7ea93af4d8408f /scripts/apidoc
parent0740aa0da3b2ac1da4fd8a134d650162457552b4 (diff)
downloadfaker-2e9ed960e3a11e4dcb78a434563fc04890c00c3d.tar.xz
faker-2e9ed960e3a11e4dcb78a434563fc04890c00c3d.zip
chore: rename generics (#2046)
Diffstat (limited to 'scripts/apidoc')
-rw-r--r--scripts/apidoc/utils.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/apidoc/utils.ts b/scripts/apidoc/utils.ts
index 8a002f49..4f8d3440 100644
--- a/scripts/apidoc/utils.ts
+++ b/scripts/apidoc/utils.ts
@@ -47,10 +47,10 @@ export function adjustUrls(description: string): string {
return description.replace(/https:\/\/(next.)?fakerjs.dev\//g, '/');
}
-export function mapByName<T extends { name: string }, V>(
- input: T[],
- valueExtractor: (item: T) => V
-): Record<string, V> {
+export function mapByName<TInput extends { name: string }, TValue>(
+ input: TInput[],
+ valueExtractor: (item: TInput) => TValue
+): Record<string, TValue> {
return input.reduce(
(acc, item) => ({ ...acc, [item.name]: valueExtractor(item) }),
{}