aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/helpers.ts9
-rw-r--r--src/vehicle.ts3
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;