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