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/random/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/modules/random') diff --git a/src/modules/random/index.ts b/src/modules/random/index.ts index 7fa16f40..98d28bc5 100644 --- a/src/modules/random/index.ts +++ b/src/modules/random/index.ts @@ -1,7 +1,6 @@ -import type { Faker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; import type { LiteralUnion } from '../../utils/types'; import type { AlphaChar, @@ -15,11 +14,7 @@ import type { * * @deprecated Use the modules specific to the type of data you want to generate instead. */ -export class RandomModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class RandomModule extends ModuleBase { /** * Returns a random word. * -- cgit v1.2.3