From 442812f66a5ad9a42e389ad1ae06dbbcddad4e99 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Tue, 1 Mar 2022 19:43:21 +0100 Subject: docs: Fix 'Missing' entries (#565) --- src/helpers.ts | 9 ++++++--- src/vehicle.ts | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/helpers.ts b/src/helpers.ts index 31878c64..7a0cba22 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -129,6 +129,7 @@ export class Helpers { * * Takes an array and returns a random element of the array. * + * @template T The type of the entries to pick from. * @param array The array to select an element from. * * @see faker.random.arrayElement() @@ -396,6 +397,7 @@ export class Helpers { * * Uses the modern version of the Fisher–Yates algorithm. * + * @template T The type of the entries to shuffle. * @param o The array to shuffle. Defaults to `[]`. * * @example @@ -423,13 +425,14 @@ export class Helpers { * and outputs a unique array of strings based on that source. * This method does not store the unique state between invocations. * + * @template T The type of the entries. * @param source The strings to choose from or a function that generates a string. * @param length The number of elements to generate. * * @example - * uniqueArray(faker.random.word, 50) - * uniqueArray(faker.definitions.name.first_name, 6) - * uniqueArray(["Hello", "World", "Goodbye"], 2) + * faker.helpers.uniqueArray(faker.random.word, 50) + * faker.helpers.uniqueArray(faker.definitions.name.first_name, 6) + * faker.helpers.uniqueArray(["Hello", "World", "Goodbye"], 2) */ uniqueArray(source: T[] | (() => T), length: number): T[] { if (Array.isArray(source)) { diff --git a/src/vehicle.ts b/src/vehicle.ts index 78661738..58fb63a1 100644 --- a/src/vehicle.ts +++ b/src/vehicle.ts @@ -3,6 +3,9 @@ import type { Fake } from './fake'; let fake: Fake['fake']; +/** + * Module to generate vehicle related entries. + */ export class Vehicle { constructor(private readonly faker: Faker) { fake = faker.fake; -- cgit v1.2.3