Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: more jsdoc fixes #2668

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/faker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ export class Faker extends SimpleFaker {
* @param options.localeFallback The name of the fallback locale to use.
*
* @example
* import { Faker, allLocales } from '@faker-js/faker';
* // const { Faker, allLocales } = require('@faker-js/faker');
*
* new Faker({ locales: allLocales });
*
* @since 6.0.0
Expand Down
6 changes: 3 additions & 3 deletions src/modules/finance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ export class FinanceModule extends ModuleBase {
/**
* Generates a random credit card number.
*
* @param options An options object. Defaults to `''`.
* @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one.
* @param options An options object.
* @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. Defaults to `''`.
*
* @example
* faker.finance.creditCardNumber() // '4427163488662'
Expand All @@ -781,7 +781,7 @@ export class FinanceModule extends ModuleBase {
* Generates a random credit card number.
*
* @param options An options object, the issuer or a custom format.
* @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one.
* @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. Defaults to `''`.
*
* @example
* faker.finance.creditCardNumber() // '4427163488662'
Expand Down
2 changes: 1 addition & 1 deletion src/modules/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ export class HelpersModule extends SimpleHelpersModule {
* faker.helpers.fake('{{person.lastName}}, {{person.firstName}} {{person.suffix}}') // 'Durgan, Noe MD'
* faker.helpers.fake('This is static test.') // 'This is static test.'
* faker.helpers.fake('Good Morning {{person.firstName}}!') // 'Good Morning Estelle!'
* faker.helpers.fake('You can call me at {{phone.number(!## ### #####!)}}.') // 'You can call me at 202 555 973722.'
* faker.helpers.fake('You can visit me at {{location.streetAddress(true)}}.') // 'You can visit me at 3393 Ronny Way Apt. 742.'
* faker.helpers.fake('I flipped the coin and got: {{helpers.arrayElement(["heads", "tails"])}}') // 'I flipped the coin and got: tails'
* faker.helpers.fake('Your PIN number is: {{string.numeric(4, {"exclude": ["0"]})}}') // 'Your PIN number is: 4834'
*
Expand Down
10 changes: 5 additions & 5 deletions src/modules/internet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,11 +701,11 @@ export class InternetModule extends ModuleBase {
*
* @example
* faker.internet.displayName() // 'Nettie_Zboncak40'
* faker.internet.displayName({ firstname 'Jeanne', lastName: 'Doe' }) // 'Jeanne98' - note surname not used.
* faker.internet.displayName({ firstname 'John', lastName: 'Doe' }) // 'John.Doe'
* faker.internet.displayName({ firstname 'Hélene', lastName: 'Müller' }) // 'Hélene_Müller11'
* faker.internet.displayName({ firstname 'Фёдор', lastName: 'Достоевский' }) // 'Фёдор.Достоевский50'
* faker.internet.displayName({ firstname '大羽', lastName: '陳' }) // '大羽.陳'
* faker.internet.displayName({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne98' - note surname not used.
* faker.internet.displayName({ firstName: 'John', lastName: 'Doe' }) // 'John.Doe'
* faker.internet.displayName({ firstName: 'Hélene', lastName: 'Müller' }) // 'Hélene_Müller11'
* faker.internet.displayName({ firstName: 'Фёдор', lastName: 'Достоевский' }) // 'Фёдор.Достоевский50'
* faker.internet.displayName({ firstName: '大羽', lastName: '陳' }) // '大羽.陳'
*
* @since 8.0.0
*/
Expand Down
6 changes: 3 additions & 3 deletions src/modules/location/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,9 @@ export class LocationModule extends ModuleBase {
*
* @example
* faker.location.longitude() // -30.9501
* faker.location.longitude({ max: 10 }) // 5.7225
* faker.location.longitude({ max: 10, min: -10 }) // -9.6273
* faker.location.longitude({ max: 10, min: -10, precision: 5 }) // 2.68452
* faker.location.longitude(10) // 5.7225
* faker.location.longitude(10, -10) // -9.6273
* faker.location.longitude(10, -10, 5) // 2.68452
*
* @since 8.0.0
*
Expand Down
2 changes: 1 addition & 1 deletion src/randomizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Instances are expected to be ready for use before being passed to any Faker constructor,
* this includes being `seed()`ed with either a random or fixed value.
*
* For more information please refer to the [documentation](/api/randomizer).
* For more information please refer to the [documentation](https://fakerjs.dev/api/randomizer.html).

Check warning on line 12 in src/randomizer.ts

View check run for this annotation

Codecov / codecov/patch

src/randomizer.ts#L12

Added line #L12 was not covered by tests
*
* @example
* import { Faker, Randomizer, SimpleFaker } from '@faker-js/faker';
Expand Down
2 changes: 2 additions & 0 deletions src/utils/merge-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import type { LocaleDefinition } from '..';
* @returns The newly merged locale.
*
* @example
* import { de_CH, de, en, mergeLocales } from '@faker-js/faker';
*
* const de_CH_with_fallbacks = mergeLocales([ de_CH, de, en ]);
*
* @since 8.0.0
Expand Down