blob: 000084cbfa65b3c9bb71b23aec268263362eee80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import type { Faker } from '../faker';
import type { SimpleFaker } from '../simple-faker';
import { bindThisToMemberFunctions } from './bind-this-to-member-functions';
/**
* Base class for all modules that use a `SimpleFaker` instance.
*/
export abstract class SimpleModuleBase {
constructor(protected readonly faker: SimpleFaker) {
bindThisToMemberFunctions(this);
}
}
/**
* Base class for all modules that use a `Faker` instance.
*/
export abstract class ModuleBase extends SimpleModuleBase {
constructor(protected readonly faker: Faker) {
super(faker);
}
}
|