diff options
| author | ST-DDT <[email protected]> | 2022-03-01 19:43:21 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-01 19:43:21 +0100 |
| commit | 442812f66a5ad9a42e389ad1ae06dbbcddad4e99 (patch) | |
| tree | 5e61a3e6362e07be588ba61a4d27c721b6db7478 /src | |
| parent | 9b559402e06eb3c615d6d7dccefd7c8fe20a67eb (diff) | |
| download | faker-442812f66a5ad9a42e389ad1ae06dbbcddad4e99.tar.xz faker-442812f66a5ad9a42e389ad1ae06dbbcddad4e99.zip | |
docs: Fix 'Missing' entries (#565)
Diffstat (limited to 'src')
| -rw-r--r-- | src/helpers.ts | 9 | ||||
| -rw-r--r-- | src/vehicle.ts | 3 |
2 files changed, 9 insertions, 3 deletions
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<T>(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; |
