Skip to content

Commit 6526323

Browse files
ST-DDTdemipel8
authored andcommitted
docs: Fix 'Missing' entries (faker-js#565)
1 parent 42547c0 commit 6526323

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/helpers.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export class Helpers {
129129
*
130130
* Takes an array and returns a random element of the array.
131131
*
132+
* @template T The type of the entries to pick from.
132133
* @param array The array to select an element from.
133134
*
134135
* @see faker.random.arrayElement()
@@ -396,6 +397,7 @@ export class Helpers {
396397
*
397398
* Uses the modern version of the Fisher–Yates algorithm.
398399
*
400+
* @template T The type of the entries to shuffle.
399401
* @param o The array to shuffle. Defaults to `[]`.
400402
*
401403
* @example
@@ -423,13 +425,14 @@ export class Helpers {
423425
* and outputs a unique array of strings based on that source.
424426
* This method does not store the unique state between invocations.
425427
*
428+
* @template T The type of the entries.
426429
* @param source The strings to choose from or a function that generates a string.
427430
* @param length The number of elements to generate.
428431
*
429432
* @example
430-
* uniqueArray(faker.random.word, 50)
431-
* uniqueArray(faker.definitions.name.first_name, 6)
432-
* uniqueArray(["Hello", "World", "Goodbye"], 2)
433+
* faker.helpers.uniqueArray(faker.random.word, 50)
434+
* faker.helpers.uniqueArray(faker.definitions.name.first_name, 6)
435+
* faker.helpers.uniqueArray(["Hello", "World", "Goodbye"], 2)
433436
*/
434437
uniqueArray<T>(source: T[] | (() => T), length: number): T[] {
435438
if (Array.isArray(source)) {

src/vehicle.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import type { Fake } from './fake';
33

44
let fake: Fake['fake'];
55

6+
/**
7+
* Module to generate vehicle related entries.
8+
*/
69
export class Vehicle {
710
constructor(private readonly faker: Faker) {
811
fake = faker.fake;

0 commit comments

Comments
 (0)