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