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/commerce/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/modules/commerce') diff --git a/src/modules/commerce/index.ts b/src/modules/commerce/index.ts index 18147dcb..48f56568 100644 --- a/src/modules/commerce/index.ts +++ b/src/modules/commerce/index.ts @@ -1,6 +1,5 @@ -import type { Faker } from '../../faker'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; // Source for official prefixes: https://www.isbn-international.org/range_file_generation const ISBN_LENGTH_RULES: Record< @@ -86,11 +85,7 @@ const ISBN_LENGTH_RULES: Record< * * You can also create a price using [`price()`](https://fakerjs.dev/api/commerce.html#price). */ -export class CommerceModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class CommerceModule extends ModuleBase { /** * Returns a department inside a shop. * -- cgit v1.2.3