diff options
| author | ST-DDT <[email protected]> | 2023-11-06 09:40:49 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-06 08:40:49 +0000 |
| commit | 48a7af4f0470115945ab166b540d0bedc7e5eb20 (patch) | |
| tree | b6344afcc6f9fca2d16555d5e3495439952b9a57 /src/modules/datatype | |
| parent | 358572d9e76f4cd22bfcb09c092a1eaf3a31f005 (diff) | |
| download | faker-48a7af4f0470115945ab166b540d0bedc7e5eb20.tar.xz faker-48a7af4f0470115945ab166b540d0bedc7e5eb20.zip | |
refactor: simplify module creation (#2485)
Diffstat (limited to 'src/modules/datatype')
| -rw-r--r-- | src/modules/datatype/index.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index 4043d6c5..a8b77a2c 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -1,6 +1,5 @@ -import type { SimpleFaker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { SimpleModuleBase } from '../../internal/module-base'; /** * Module to generate various primitive values and data types. @@ -11,11 +10,7 @@ import { deprecated } from '../../internal/deprecated'; * * For a simple random true or false value, use [`boolean()`](https://fakerjs.dev/api/datatype.html#boolean). */ -export class DatatypeModule { - constructor(private readonly faker: SimpleFaker) { - bindThisToMemberFunctions(this); - } - +export class DatatypeModule extends SimpleModuleBase { /** * Returns a single random number between zero and the given max value or the given range with the specified precision. * The bounds are inclusive. |
