diff options
Diffstat (limited to 'src/modules/date')
| -rw-r--r-- | src/modules/date/index.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts index c99a7d19..d7a0f12a 100644 --- a/src/modules/date/index.ts +++ b/src/modules/date/index.ts @@ -28,7 +28,9 @@ function toDate( export class DateModule { constructor(private readonly faker: Faker) { // Bind `this` so namespaced is working correctly - for (const name of Object.getOwnPropertyNames(DateModule.prototype)) { + for (const name of Object.getOwnPropertyNames( + DateModule.prototype + ) as Array<keyof DateModule | 'constructor'>) { if (name === 'constructor' || typeof this[name] !== 'function') { continue; } |
