Skip to content

Commit

Permalink
docs: missing options jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Feb 3, 2024
1 parent b1987ef commit dc10a86
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/faker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,27 @@ export class Faker extends SimpleFaker {
* @deprecated Use `new Faker({ locale: [locale, localeFallback] })` instead.
*/
constructor(options: {
/**
* The locale data to use for this instance.
*
* @deprecated Use `new Faker({ locale: [locale, localeFallback] })` instead.
*/
locales: Record<string, LocaleDefinition>;
/**
* The name of the main locale to use.
*
* @default 'en'
*
* @deprecated Use `new Faker({ locale: [locale, localeFallback] })` instead.
*/
locale?: string;
/**
* The name of the fallback locale to use.
*
* @default 'en'
*
* @deprecated Use `new Faker({ locale: [locale, localeFallback] })` instead.
*/
localeFallback?: string;
});
// This is somehow required for `ConstructorParameters<typeof Faker>[0]` to work
Expand Down
15 changes: 15 additions & 0 deletions src/modules/finance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,23 @@ export class FinanceModule extends ModuleBase {
* @since 8.0.0
*/
maskedNumber(options?: {
/**
* The length of the unmasked number.
*
* @default 4
*/
length?: number;
/**
* Whether to use surrounding parenthesis.
*
* @default true
*/
parens?: boolean;
/**
* Whether to prefix the numbers with an ellipsis.
*
* @default true
*/
ellipsis?: boolean;
}): string;
/**
Expand Down
4 changes: 3 additions & 1 deletion src/modules/number/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class NumberModule extends SimpleModuleBase {
* The maximum number of digits to appear after the decimal point, for example `2` will round to 2 decimal points. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed.
*/
fractionDigits?: number;
/*
/**
* Deprecated alias for `multipleOf`. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed.
*
* @deprecated Use `multipleOf` instead.
Expand All @@ -156,7 +156,9 @@ export class NumberModule extends SimpleModuleBase {
min = 0,
max = 1,
fractionDigits,
// eslint-disable-next-line deprecation/deprecation
precision,
// eslint-disable-next-line deprecation/deprecation
multipleOf: originalMultipleOf = precision,
multipleOf = precision ??
(fractionDigits == null ? undefined : 10 ** -fractionDigits),
Expand Down

0 comments on commit dc10a86

Please sign in to comment.