aboutsummaryrefslogtreecommitdiff
path: root/src/modules/date
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-11-06 09:40:49 +0100
committerGitHub <[email protected]>2023-11-06 08:40:49 +0000
commit48a7af4f0470115945ab166b540d0bedc7e5eb20 (patch)
treeb6344afcc6f9fca2d16555d5e3495439952b9a57 /src/modules/date
parent358572d9e76f4cd22bfcb09c092a1eaf3a31f005 (diff)
downloadfaker-48a7af4f0470115945ab166b540d0bedc7e5eb20.tar.xz
faker-48a7af4f0470115945ab166b540d0bedc7e5eb20.zip
refactor: simplify module creation (#2485)
Diffstat (limited to 'src/modules/date')
-rw-r--r--src/modules/date/index.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts
index 3ad5f438..69854688 100644
--- a/src/modules/date/index.ts
+++ b/src/modules/date/index.ts
@@ -1,8 +1,8 @@
-import type { Faker, SimpleFaker } from '../..';
+import type { Faker } from '../..';
import type { DateEntryDefinition } from '../../definitions';
import { FakerError } from '../../errors/faker-error';
-import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions';
import { deprecated } from '../../internal/deprecated';
+import { SimpleModuleBase } from '../../internal/module-base';
/**
* Converts date passed as a string, number or Date to a Date object.
@@ -26,11 +26,7 @@ function toDate(
/**
* Module to generate dates (without methods requiring localized data).
*/
-export class SimpleDateModule {
- constructor(protected readonly faker: SimpleFaker) {
- bindThisToMemberFunctions(this);
- }
-
+export class SimpleDateModule extends SimpleModuleBase {
/**
* Generates a random date that can be either in the past or in the future.
*