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: consistent @see jsdoc tags #2473

Merged
merged 28 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6bd0c1d
docs: consistent @see jsdoc tags
ST-DDT Oct 12, 2023
23218eb
Apply suggestions from code review
ST-DDT Oct 12, 2023
a421c7c
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 15, 2023
bc48276
chore: adjust jsdocs
ST-DDT Oct 15, 2023
7f86d60
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 15, 2023
e22b4ed
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 17, 2023
8513d04
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 17, 2023
21823b8
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 20, 2023
6cc12cf
chore: apply review suggestions
ST-DDT Oct 20, 2023
fabaa65
chore: apply review suggestions
ST-DDT Oct 20, 2023
7076490
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 22, 2023
0d77bb5
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 26, 2023
481a1de
docs: rephrase see tags
ST-DDT Oct 26, 2023
0333c74
docs: standardize see tags
ST-DDT Oct 26, 2023
4aa7765
docs: standardize see tags
ST-DDT Oct 26, 2023
f8599d9
docs: standardize see tags
ST-DDT Oct 26, 2023
533cef1
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 26, 2023
6bf16d6
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 29, 2023
2aea870
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Oct 30, 2023
2c77370
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Nov 6, 2023
94cd925
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Nov 7, 2023
765c0ef
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Nov 7, 2023
d6c30f4
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Nov 13, 2023
16f5b63
chore: apply suggestions
ST-DDT Nov 13, 2023
f18639c
chore: apply suggestions
ST-DDT Nov 13, 2023
82c8015
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Nov 13, 2023
43494ef
Merge branch 'next' into jsdocs/consistent-see-tags
ST-DDT Nov 14, 2023
ce4ebbe
Merge branch 'next' into jsdocs/consistent-see-tags
xDivisionByZerox Nov 20, 2023
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
2 changes: 1 addition & 1 deletion src/definitions/finance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* The pattern by (lowercase) issuer name used to generate credit card codes.
* `L` will be replaced by the check bit.
*
* @see faker.helpers.replaceCreditCardSymbols()
* @see faker.helpers.replaceCreditCardSymbols(): For more information about how the pattern is used.

Check warning on line 16 in src/definitions/finance.ts

View check run for this annotation

Codecov / codecov/patch

src/definitions/finance.ts#L16

Added line #L16 was not covered by tests
*/
credit_card: { [issuer: string]: string[] };

Expand Down
2 changes: 1 addition & 1 deletion src/definitions/hacker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* May use any of the HackerDefinition keys wrapped in double braces
* (e.g. `I'm {{ingverb}} {{adjective}} {{noun}}`).
*
* @see faker.helpers.mustache()
* @see faker.helpers.mustache(): For more information about how the phrases are generated.

Check warning on line 32 in src/definitions/hacker.ts

View check run for this annotation

Codecov / codecov/patch

src/definitions/hacker.ts#L32

Added line #L32 was not covered by tests
*/
phrase: string[];

Expand Down
2 changes: 1 addition & 1 deletion src/definitions/phone_number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* `!` will be replaced by a random digit (2-9).
* (e.g. `!##-!##-####` -> 272-285-0453)
*
* @see faker.helpers.replaceSymbolWithNumber(format)
* @see faker.helpers.replaceSymbolWithNumber(format): For more information about how the patterns are used.

Check warning on line 13 in src/definitions/phone_number.ts

View check run for this annotation

Codecov / codecov/patch

src/definitions/phone_number.ts#L13

Added line #L13 was not covered by tests
*/
formats: string[];
}>;
4 changes: 2 additions & 2 deletions src/faker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class Faker extends SimpleFaker {
* The locale data to use for this instance.
* If an array is provided, the first locale that has a definition for a given property will be used.
*
* @see mergeLocales
* @see mergeLocales(): For more information about how the locales are merged.
*/
locale: LocaleDefinition | LocaleDefinition[];

Expand Down Expand Up @@ -218,7 +218,7 @@ export class Faker extends SimpleFaker {
* The locale data to use for this instance.
* If an array is provided, the first locale that has a definition for a given property will be used.
*
* @see mergeLocales
* @see mergeLocales(): For more information about how the locales are merged.
*/
locale: LocaleDefinition | LocaleDefinition[];

Expand Down
4 changes: 2 additions & 2 deletions src/modules/company/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class CompanyModule extends ModuleBase {
/**
* Returns an array with possible company name suffixes.
*
* @see faker.company.name()
* @see faker.company.name(): For generating a complete company name.
*
* @example
* faker.company.suffixes() // [ 'Inc', 'and Sons', 'LLC', 'Group' ]
Expand Down Expand Up @@ -55,7 +55,7 @@ export class CompanyModule extends ModuleBase {
/**
* Returns a random company suffix.
*
* @see faker.company.name()
* @see faker.company.name(): For generating a complete company name.
*
* @example
* faker.company.companySuffix() // 'and Sons'
Expand Down
19 changes: 10 additions & 9 deletions src/modules/datatype/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export class DatatypeModule extends SimpleModuleBase {
*
* @throws When options define `max < min`.
*
* @see faker.number.int() for the default precision of `1`
* @see faker.number.float() for a custom precision
* @see faker.number.int(): For generating a random integer.
* @see faker.number.float(): For generating a random floating-point number.
*
* @example
* faker.datatype.number() // 55422
Expand Down Expand Up @@ -85,7 +85,7 @@ export class DatatypeModule extends SimpleModuleBase {
* @param options.max Upper bound for generated number. Defaults to `min + 99999`.
* @param options.precision Precision of the generated number. Defaults to `0.01`.
*
* @see faker.number.float()
* @see faker.number.float(): For the replacement method.
*
* @example
* faker.datatype.float() // 51696.36
Expand Down Expand Up @@ -153,8 +153,8 @@ export class DatatypeModule extends SimpleModuleBase {
* When not provided or larger than `8640000000000000`, `2100-01-01` is considered
* as maximum generated date. Defaults to `4102444800000`.
*
* @see faker.date.anytime()
* @see faker.date.between()
* @see faker.date.anytime(): For generating a random date in either the past or future.
* @see faker.date.between(): For generating a random date in between two dates.
*
* @example
* faker.datatype.datetime() // '2089-04-17T18:03:24.956Z'
Expand Down Expand Up @@ -216,7 +216,7 @@ export class DatatypeModule extends SimpleModuleBase {
* @param options Length of the generated string or an options object.
* @param options.length Length of the generated string. Max length is `2^20`. Defaults to `10`.
*
* @see faker.string.sample()
* @see faker.string.sample(): For the replacement method.
*
* @example
* faker.datatype.string() // 'Zo!.:*e>wR'
Expand Down Expand Up @@ -257,7 +257,7 @@ export class DatatypeModule extends SimpleModuleBase {
/**
* Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)).
*
* @see faker.string.uuid()
* @see faker.string.uuid(): For the replacement method.
*
* @example
* faker.datatype.uuid() // '4136cd0b-d90b-4af7-b485-5d1ded8db252'
Expand Down Expand Up @@ -334,7 +334,8 @@ export class DatatypeModule extends SimpleModuleBase {
* @param options.prefix Prefix for the generated number. Defaults to `'0x'`.
* @param options.case Case of the generated number. Defaults to `'mixed'`.
*
* @see faker.string.hexadecimal()
* @see faker.string.hexadecimal(): For generating a random hexadecimal string.
* @see faker.number.hex(): For generating a random hexadecimal number.
*
* @example
* faker.datatype.hexadecimal() // '0xB'
Expand Down Expand Up @@ -464,7 +465,7 @@ export class DatatypeModule extends SimpleModuleBase {
*
* @throws When options define `max < min`.
*
* @see faker.number.bigInt()
* @see faker.number.bigInt(): For the replacement method.
*
* @example
* faker.datatype.bigInt() // 55422n
Expand Down
30 changes: 15 additions & 15 deletions src/modules/date/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options The optional options object.
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.between() For dates in a specific range.
* @see faker.date.past() For dates explicitly in the past.
* @see faker.date.future() For dates explicitly in the future.
* @see faker.date.between(): For generating dates in a specific range.
* @see faker.date.past(): For generating dates explicitly in the past.
* @see faker.date.future(): For generating dates explicitly in the future.
*
* @example
* faker.date.anytime() // '2022-07-31T01:33:29.567Z'
Expand Down Expand Up @@ -74,7 +74,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.years The range of years the date may be in the past. Defaults to `1`.
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.recent()
* @see faker.date.recent(): For generating dates in the recent past (days instead of years).
*
* @example
* faker.date.past() // '2021-12-03T05:40:44.408Z'
Expand Down Expand Up @@ -103,7 +103,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param years The range of years the date may be in the past. Defaults to `1`.
* @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.recent()
* @see faker.date.recent(): For generating dates in the recent past (days instead of years).
*
* @example
* faker.date.past() // '2021-12-03T05:40:44.408Z'
Expand All @@ -123,7 +123,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
* @param legacyRefDate Deprecated, use `options.refDate` instead.
*
* @see faker.date.recent()
* @see faker.date.recent(): For generating dates in the recent past (days instead of years).
*
* @example
* faker.date.past() // '2021-12-03T05:40:44.408Z'
Expand Down Expand Up @@ -196,7 +196,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.years The range of years the date may be in the future. Defaults to `1`.
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.soon()
* @see faker.date.soon(): For generating dates in the near future (days instead of years).
*
* @example
* faker.date.future() // '2022-11-19T05:52:49.100Z'
Expand Down Expand Up @@ -225,7 +225,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param years The range of years the date may be in the future. Defaults to `1`.
* @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.soon()
* @see faker.date.soon(): For generating dates in the near future (days instead of years).
*
* @example
* faker.date.future() // '2022-11-19T05:52:49.100Z'
Expand All @@ -245,7 +245,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
* @param legacyRefDate Deprecated, use `options.refDate` instead.
*
* @see faker.date.soon()
* @see faker.date.soon(): For generating dates in the near future (days instead of years).
*
* @example
* faker.date.future() // '2022-11-19T05:52:49.100Z'
Expand Down Expand Up @@ -590,7 +590,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.days The range of days the date may be in the past. Defaults to `1`.
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.past()
* @see faker.date.past(): For generating dates further back in time (years instead of days).
*
* @example
* faker.date.recent() // '2022-02-04T02:09:35.077Z'
Expand Down Expand Up @@ -619,7 +619,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param days The range of days the date may be in the past. Defaults to `1`.
* @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.past()
* @see faker.date.past(): For generating dates further back in time (years instead of days).
*
* @example
* faker.date.recent() // '2022-02-04T02:09:35.077Z'
Expand All @@ -639,7 +639,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
* @param legacyRefDate Deprecated, use `options.refDate` instead.
*
* @see faker.date.past()
* @see faker.date.past(): For generating dates further back in time (years instead of days).
*
* @example
* faker.date.recent() // '2022-02-04T02:09:35.077Z'
Expand Down Expand Up @@ -707,7 +707,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.days The range of days the date may be in the future. Defaults to `1`.
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.future()
* @see faker.date.future(): For generating dates further in the future (years instead of days).
*
* @example
* faker.date.soon() // '2022-02-05T09:55:39.216Z'
Expand Down Expand Up @@ -736,7 +736,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param days The range of days the date may be in the future. Defaults to `1`.
* @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
*
* @see faker.date.future()
* @see faker.date.future(): For generating dates further in the future (years instead of days).
*
* @example
* faker.date.soon() // '2022-02-05T09:55:39.216Z'
Expand All @@ -756,7 +756,7 @@ export class SimpleDateModule extends SimpleModuleBase {
* @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`.
* @param legacyRefDate Deprecated, use `options.refDate` instead.
*
* @see faker.date.future()
* @see faker.date.future(): For generating dates further in the future (years instead of days).
*
* @example
* faker.date.soon() // '2022-02-05T09:55:39.216Z'
Expand Down
10 changes: 5 additions & 5 deletions src/modules/finance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class FinanceModule extends ModuleBase {
*
* @param length The length of the account number. Defaults to `8`.
*
* @see faker.finance.accountNumber()
* @see faker.finance.accountNumber(): For the replacement method.
*
* @example
* faker.finance.account() // 92842238
Expand Down Expand Up @@ -220,7 +220,7 @@ export class FinanceModule extends ModuleBase {
* @param parens Whether to use surrounding parenthesis. Defaults to `true`.
* @param ellipsis Whether to prefix the numbers with an ellipsis. Defaults to `true`.
*
* @see faker.finance.maskedNumber()
* @see faker.finance.maskedNumber(): For the replacement method.
*
* @example
* faker.finance.mask() // '(...9711)'
Expand Down Expand Up @@ -629,9 +629,9 @@ export class FinanceModule extends ModuleBase {
* Returns a random currency object, containing `code`, `name `and `symbol` properties.
*
* @see
* faker.finance.currencyCode()
* faker.finance.currencyName()
* faker.finance.currencySymbol()
* faker.finance.currencyCode(): For generating specifically the currency code.
* faker.finance.currencyName(): For generating specifically the currency name.
* faker.finance.currencySymbol(): For generating specifically the currency symbol.
*
* @example
* faker.finance.currency() // { code: 'USD', name: 'US Dollar', symbol: '$' }
Expand Down
8 changes: 4 additions & 4 deletions src/modules/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class SimpleHelpersModule extends SimpleModuleBase {
*
* @param string The template string to parse. Defaults to `''`.
*
* @see faker.helpers.fromRegExp()
* @see faker.helpers.fromRegExp(): For generating a string matching the given regex-like expressions.
*
* @example
* faker.helpers.regexpStyleStringParse() // ''
Expand Down Expand Up @@ -1292,7 +1292,7 @@ export class HelpersModule extends SimpleHelpersModule {
*
* @param pattern The pattern string that will get interpolated.
*
* @see faker.helpers.mustache() to use custom functions for resolution.
* @see faker.helpers.mustache(): For using custom functions to resolve templates.
*
* @example
* faker.helpers.fake('{{person.lastName}}') // 'Barrows'
Expand Down Expand Up @@ -1344,7 +1344,7 @@ export class HelpersModule extends SimpleHelpersModule {
*
* @param patterns The array to select a pattern from, that will then get interpolated. Must not be empty.
*
* @see faker.helpers.mustache() to use custom functions for resolution.
* @see faker.helpers.mustache(): For using custom functions to resolve templates.
*
* @example
* faker.helpers.fake(['A: {{person.firstName}}', 'B: {{person.lastName}}']) // 'A: Barry'
Expand Down Expand Up @@ -1387,7 +1387,7 @@ export class HelpersModule extends SimpleHelpersModule {
*
* @param pattern The pattern string that will get interpolated. If an array is passed, a random element will be picked and interpolated.
*
* @see faker.helpers.mustache() to use custom functions for resolution.
* @see faker.helpers.mustache(): For using custom functions to resolve templates.
*
* @example
* faker.helpers.fake('{{person.lastName}}') // 'Barrows'
Expand Down
Loading