From 48a7af4f0470115945ab166b540d0bedc7e5eb20 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 6 Nov 2023 09:40:49 +0100 Subject: refactor: simplify module creation (#2485) --- src/modules/git/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/modules/git/index.ts') diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts index cbbeb351..89ab4799 100644 --- a/src/modules/git/index.ts +++ b/src/modules/git/index.ts @@ -1,6 +1,5 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; const nbsp = '\u00A0'; @@ -11,11 +10,7 @@ const nbsp = '\u00A0'; * * [`commitEntry()`](https://fakerjs.dev/api/git.html#commitentry) generates a random commit entry as printed by `git log`. This includes a commit hash [`commitSha()`](https://fakerjs.dev/api/git.html#commitsha), author, date [`commitDate()`](https://fakerjs.dev/api/git.html#commitdate), and commit message [`commitMessage()`](https://fakerjs.dev/api/git.html#commitmessage). You can also generate a random branch name with [`branch()`](https://fakerjs.dev/api/git.html#branch). */ -export class GitModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class GitModule extends ModuleBase { /** * Generates a random branch name. * -- cgit v1.2.3