diff --git a/src/faker.ts b/src/faker.ts index 97a513d052c..e63b89b3e59 100644 --- a/src/faker.ts +++ b/src/faker.ts @@ -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; + /** + * 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[0]` to work diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts index 111db57101c..f7a84f7403e 100644 --- a/src/modules/finance/index.ts +++ b/src/modules/finance/index.ts @@ -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; /** diff --git a/src/modules/number/index.ts b/src/modules/number/index.ts index b4137ccebe5..9e9eb4edcd0 100644 --- a/src/modules/number/index.ts +++ b/src/modules/number/index.ts @@ -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. @@ -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), diff --git a/src/simple-faker.ts b/src/simple-faker.ts index 4dd755e1cc7..3993392deab 100644 --- a/src/simple-faker.ts +++ b/src/simple-faker.ts @@ -105,7 +105,7 @@ export class SimpleFaker { * // create a SimpleFaker without any locale data * const customSimpleFaker = new SimpleFaker(); * - * customSimpleFaker.helpers.arrayElement([red', 'green', 'blue']); // 'green' + * customSimpleFaker.helpers.arrayElement(['red', 'green', 'blue']); // 'green' * customSimpleFaker.number.int(10); // 4 * * @since 8.1.0