@@ -129,6 +129,7 @@ export class Helpers {
129
129
*
130
130
* Takes an array and returns a random element of the array.
131
131
*
132
+ * @template T The type of the entries to pick from.
132
133
* @param array The array to select an element from.
133
134
*
134
135
* @see faker.random.arrayElement()
@@ -396,6 +397,7 @@ export class Helpers {
396
397
*
397
398
* Uses the modern version of the Fisher–Yates algorithm.
398
399
*
400
+ * @template T The type of the entries to shuffle.
399
401
* @param o The array to shuffle. Defaults to `[]`.
400
402
*
401
403
* @example
@@ -423,13 +425,14 @@ export class Helpers {
423
425
* and outputs a unique array of strings based on that source.
424
426
* This method does not store the unique state between invocations.
425
427
*
428
+ * @template T The type of the entries.
426
429
* @param source The strings to choose from or a function that generates a string.
427
430
* @param length The number of elements to generate.
428
431
*
429
432
* @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)
433
436
*/
434
437
uniqueArray < T > ( source : T [ ] | ( ( ) => T ) , length : number ) : T [ ] {
435
438
if ( Array . isArray ( source ) ) {
0 commit comments