Skip to content

Commit

Permalink
remove more
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Feb 16, 2024
1 parent 992a923 commit 4c0fde9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
3 changes: 3 additions & 0 deletions docs/guide/upgrading_v9/2608.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Removed all v8 deprecations

see title
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export type {
LoremDefinition,
MetadataDefinition,
MusicDefinition,
/** @deprecated Use PersonDefinition instead */
PersonDefinition as NameDefinition,
PersonDefinition,
PersonTitleDefinition,
PhoneNumberDefinition,
Expand All @@ -42,10 +44,6 @@ export type { AircraftType, AirlineModule } from './modules/airline';
export type { AnimalModule } from './modules/animal';
export { CssFunction, CssSpace } from './modules/color';
export type {
/** @deprecated Use CssFunctionType instead */
CssFunctionType as CSSFunction,
/** @deprecated Use CssSpaceType instead */
CssSpaceType as CSSSpace,
Casing,
ColorFormat,
ColorModule,
Expand Down
4 changes: 1 addition & 3 deletions src/modules/datatype/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { SimpleModuleBase } from '../../internal/module-base';

/**
* Module to generate various primitive values and data types.
* Module to generate a boolean value.
*
* ### Overview
*
* Most of the methods in this module are deprecated and have been moved to other modules like [`faker.number`](https://fakerjs.dev/api/number.html) and [`faker.string`](https://fakerjs.dev/api/string.html), see individual entries for replacements.
*
* For a simple random true or false value, use [`boolean()`](https://fakerjs.dev/api/datatype.html#boolean).
*/
export class DatatypeModule extends SimpleModuleBase {
Expand Down
2 changes: 0 additions & 2 deletions src/modules/image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { ModuleBase } from '../../internal/module-base';
* For a random placeholder image containing only solid color and text, use [`urlPlaceholder()`](https://fakerjs.dev/api/image.html#urlplaceholder) (uses a third-party service) or [`dataUri()`](https://fakerjs.dev/api/image.html#datauri) (returns a SVG string).
*
* For a random user avatar image, use [`avatar()`](https://fakerjs.dev/api/image.html#avatar).
*
* This module previously also contained methods for specifically themed images like "fashion" or "food", but these are now deprecated. If you need more control over image type, you can request categorized images using [`urlLoremFlickr()`](https://fakerjs.dev/api/image.html#urlloremflickr), use an image provider directly or provide your own set of placeholder images.
*/
export class ImageModule extends ModuleBase {
/**
Expand Down
8 changes: 3 additions & 5 deletions src/modules/number/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ export class NumberModule extends SimpleModuleBase {
* @param options Upper bound or options object.
* @param options.min Lower bound for generated number, inclusive. Defaults to `0.0`.
* @param options.max Upper bound for generated number, exclusive, unless `multipleOf`, `precision` or `fractionDigits` are passed. Defaults to `1.0`.
* @param options.precision Deprecated alias for `multipleOf`. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed.
* @param options.multipleOf The generated number will be a multiple of this parameter. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed.
* @param options.fractionDigits 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.
*
* @throws When `min` is greater than `max`.
* @throws When `precision` is negative.
* @throws When `multipleOf` is negative.
* @throws When `fractionDigits` is negative.
* @throws When `fractionDigits` and `multipleOf` is passed in the same options object.
Expand Down Expand Up @@ -124,17 +122,17 @@ export class NumberModule extends SimpleModuleBase {
*/
min?: number;
/**
* Upper bound for generated number, exclusive, unless `multipleOf`, `precision` or `fractionDigits` are passed.
* Upper bound for generated number, exclusive, unless `multipleOf` or `fractionDigits` are passed.
*
* @default 1.0
*/
max?: number;
/**
* 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.
* The maximum number of digits to appear after the decimal point, for example `2` will round to 2 decimal points. Only one of `multipleOf` or `fractionDigits` should be passed.
*/
fractionDigits?: number;
/**
* The generated number will be a multiple of this parameter. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed.
* The generated number will be a multiple of this parameter. Only one of `multipleOf` or `fractionDigits` should be passed.
*/
multipleOf?: number;
} = {}
Expand Down

0 comments on commit 4c0fde9

Please sign in to comment.