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