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/finance/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/modules/finance') diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts index b381e16c..ddf3fffe 100644 --- a/src/modules/finance/index.ts +++ b/src/modules/finance/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 iban from './iban'; /** @@ -37,11 +36,7 @@ export interface Currency { * * For blockchain related methods, use: [`bitcoinAddress()`](https://fakerjs.dev/api/finance.html#bitcoinaddress), [`ethereumAddress()`](https://fakerjs.dev/api/finance.html#ethereumaddress) and [`litecoinAddress()`](https://fakerjs.dev/api/finance.html#litecoinaddress). */ -export class FinanceModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class FinanceModule extends ModuleBase { /** * Generates a random account number. * -- cgit v1.2.3