aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-04-17 10:13:48 +0200
committerGitHub <[email protected]>2023-04-17 08:13:48 +0000
commit62b1aed46b108b08b25fcedf8d2606870cffb233 (patch)
tree8626a5101dfb7a63752397f8e02d914ed1c5c225 /src/modules
parent153e0ca29742c42814a97117f7d976f23e93c0d4 (diff)
downloadfaker-62b1aed46b108b08b25fcedf8d2606870cffb233.tar.xz
faker-62b1aed46b108b08b25fcedf8d2606870cffb233.zip
chore: consistent jsdocs tag formatting (#2056)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/finance/index.ts6
-rw-r--r--src/modules/git/index.ts1
-rw-r--r--src/modules/helpers/index.ts13
-rw-r--r--src/modules/helpers/unique.ts1
-rw-r--r--src/modules/person/index.ts1
-rw-r--r--src/modules/system/index.ts1
6 files changed, 22 insertions, 1 deletions
diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts
index 579bd89b..cca634c0 100644
--- a/src/modules/finance/index.ts
+++ b/src/modules/finance/index.ts
@@ -839,6 +839,7 @@ export class FinanceModule {
* Generates a random PIN number.
*
* @param length The length of the PIN to generate. Defaults to `4`.
+ *
* @throws Will throw an error if length is less than 1.
*
* @example
@@ -853,6 +854,7 @@ export class FinanceModule {
*
* @param options An options object. Defaults to `{}`.
* @param options.length The length of the PIN to generate. Defaults to `4`.
+ *
* @throws Will throw an error if length is less than 1.
*
* @example
@@ -874,6 +876,7 @@ export class FinanceModule {
*
* @param options An options object or the length of the PIN. Defaults to `{}`.
* @param options.length The length of the PIN to generate. Defaults to `4`.
+ *
* @throws Will throw an error if length is less than 1.
*
* @example
@@ -900,6 +903,7 @@ export class FinanceModule {
*
* @param options An options object or the length of the PIN. Defaults to `{}`.
* @param options.length The length of the PIN to generate. Defaults to `4`.
+ *
* @throws Will throw an error if length is less than 1.
*
* @example
@@ -957,6 +961,7 @@ export class FinanceModule {
*
* @param formatted Return a formatted version of the generated IBAN. Defaults to `false`.
* @param countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used.
+ *
* @throws Will throw an error if the passed country code is not supported.
*
* @example
@@ -973,6 +978,7 @@ export class FinanceModule {
* @param options An options object. Defaults to `{}`.
* @param options.formatted Return a formatted version of the generated IBAN. Defaults to `false`.
* @param options.countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used.
+ *
* @throws Will throw an error if the passed country code is not supported.
*
* @example
diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts
index 81e79af0..791ea06b 100644
--- a/src/modules/git/index.ts
+++ b/src/modules/git/index.ts
@@ -62,7 +62,6 @@ export class GitModule {
* @param options.eol Choose the end of line character to use. Defaults to 'CRLF'.
* 'LF' = '\n',
* 'CRLF' = '\r\n'
- *
* @param options.refDate The date to use as reference point for the commit. Defaults to `new Date()`.
*
* @example
diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts
index 0f1c93a8..d90bcbda 100644
--- a/src/modules/helpers/index.ts
+++ b/src/modules/helpers/index.ts
@@ -555,6 +555,7 @@ export class HelpersModule {
* Takes an array and randomizes it in place then returns it.
*
* @template T The type of the elements to shuffle.
+ *
* @param list The array to shuffle.
* @param options The options to use when shuffling.
* @param options.inplace Whether to shuffle the array in place or return a new array. Defaults to `false`.
@@ -579,6 +580,7 @@ export class HelpersModule {
* Returns a randomized version of the array.
*
* @template T The type of the elements to shuffle.
+ *
* @param list The array to shuffle.
* @param options The options to use when shuffling.
* @param options.inplace Whether to shuffle the array in place or return a new array. Defaults to `false`.
@@ -604,6 +606,7 @@ export class HelpersModule {
* Returns a randomized version of the array.
*
* @template T The type of the elements to shuffle.
+ *
* @param list The array to shuffle.
* @param options The options to use when shuffling.
* @param options.inplace Whether to shuffle the array in place or return a new array. Defaults to `false`.
@@ -647,6 +650,7 @@ export class HelpersModule {
* This method does not store the unique state between invocations.
*
* @template T The type of the elements.
+ *
* @param source The strings to choose from or a function that generates a string.
* @param length The number of elements to generate.
*
@@ -721,6 +725,7 @@ export class HelpersModule {
* Returns the result of the callback if the probability check was successful, otherwise `undefined`.
*
* @template T The type of result of the given callback.
+ *
* @param callback The callback to that will be invoked if the probability check was successful.
* @param options The options to use. Defaults to `{}`.
* @param options.probability The probability (`[0.00, 1.00]`) of the callback being invoked. Defaults to `0.5`.
@@ -754,6 +759,7 @@ export class HelpersModule {
* Returns a random key from given object or `undefined` if no key could be found.
*
* @template T The type of the object to select from.
+ *
* @param object The object to be used.
*
* @example
@@ -770,6 +776,7 @@ export class HelpersModule {
* Returns a random value from given object or `undefined` if no key could be found.
*
* @template T The type of object to select from.
+ *
* @param object The object to be used.
*
* @example
@@ -786,6 +793,7 @@ export class HelpersModule {
* Returns random element from the given array.
*
* @template T The type of the elements to pick from.
+ *
* @param array Array to pick the value from.
*
* @example
@@ -813,6 +821,7 @@ export class HelpersModule {
* For example, if there are two values A and B, with weights 1 and 2 respectively, then the probability of picking A is 1/3 and the probability of picking B is 2/3.
*
* @template T The type of the elements to pick from.
+ *
* @param array Array to pick the value from.
* @param array[].weight The weight of the value.
* @param array[].value The value to pick.
@@ -868,6 +877,7 @@ export class HelpersModule {
* Returns a subset with random elements of the given array in random order.
*
* @template T The type of the elements to pick from.
+ *
* @param array Array to pick the value from.
* @param count Number or range of elements to pick.
* When not provided, random number of elements will be picked.
@@ -934,6 +944,7 @@ export class HelpersModule {
* This does the same as `objectValue` except that it ignores (the values assigned to) the numeric keys added for TypeScript enums.
*
* @template EnumType Type of generic enums, automatically inferred by TypeScript.
+ *
* @param enumObject Enum to pick the value from.
*
* @example
@@ -1228,6 +1239,7 @@ export class HelpersModule {
* Used unique entries will be stored internally and filtered from subsequent calls.
*
* @template Method The type of the method to execute.
+ *
* @param method The method used to generate the values.
* @param args The arguments used to call the method.
* @param options The optional options used to configure this method.
@@ -1327,6 +1339,7 @@ export class HelpersModule {
* Generates an array containing values returned by the given method.
*
* @template T The type of elements.
+ *
* @param method The method used to generate the values.
* @param options The optional options object.
* @param options.count The number or range of elements to generate. Defaults to `3`.
diff --git a/src/modules/helpers/unique.ts b/src/modules/helpers/unique.ts
index 8276c862..5cf55a66 100644
--- a/src/modules/helpers/unique.ts
+++ b/src/modules/helpers/unique.ts
@@ -70,6 +70,7 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`
* Used unique entries will be stored internally and filtered from subsequent calls.
*
* @template Method The type of the method to execute.
+ *
* @param method The method used to generate the values.
* @param args The arguments used to call the method.
* @param options The optional options used to configure this method.
diff --git a/src/modules/person/index.ts b/src/modules/person/index.ts
index 5dbeea3d..98197c03 100644
--- a/src/modules/person/index.ts
+++ b/src/modules/person/index.ts
@@ -17,6 +17,7 @@ export type SexType = `${Sex}`;
* @param param2.generic Non-sex definitions.
* @param param2.female Female definitions.
* @param param2.male Male definitions.
+ *
* @returns Definition based on given sex.
*/
function selectDefinition<T>(
diff --git a/src/modules/system/index.ts b/src/modules/system/index.ts
index 35ca2c8d..a4cf6745 100644
--- a/src/modules/system/index.ts
+++ b/src/modules/system/index.ts
@@ -102,6 +102,7 @@ export class SystemModule {
* Returns a random file name with a given extension or a commonly used extension.
*
* @param ext Extension. Empty string is considered to be not set.
+ *
* @example
* faker.system.commonFileName() // 'dollar.jpg'
* faker.system.commonFileName('txt') // 'global_borders_wyoming.txt'