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/database/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/modules/database') diff --git a/src/modules/database/index.ts b/src/modules/database/index.ts index 6015cfa2..6c3595cc 100644 --- a/src/modules/database/index.ts +++ b/src/modules/database/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate database related entries. @@ -10,11 +9,7 @@ import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-fu * * For the NoSQL database MongoDB, [`mongodbObjectId()`](https://fakerjs.dev/api/database.html#mongodbobjectid) provides a random ID. */ -export class DatabaseModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class DatabaseModule extends ModuleBase { /** * Returns a random database column name. * -- cgit v1.2.3