diff options
| author | Shinigami <[email protected]> | 2023-02-15 19:29:44 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-15 18:29:44 +0000 |
| commit | e7230f6f10af9633cf0eca18910cbafaaba9ecba (patch) | |
| tree | 60c27d30661f85b8ec2155e8a2f39ffdb8559f63 /src/modules/image/index.ts | |
| parent | 1399375686afb99a4ea55a6153601905f395304d (diff) | |
| download | faker-e7230f6f10af9633cf0eca18910cbafaaba9ecba.tar.xz faker-e7230f6f10af9633cf0eca18910cbafaaba9ecba.zip | |
chore: activate noImplicitAny (#1839)
Diffstat (limited to 'src/modules/image/index.ts')
| -rw-r--r-- | src/modules/image/index.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts index 794a9514..ac42dc25 100644 --- a/src/modules/image/index.ts +++ b/src/modules/image/index.ts @@ -26,12 +26,16 @@ export class ImageModule { constructor(private readonly faker: Faker) { // Bind `this` so namespaced is working correctly - for (const name of Object.getOwnPropertyNames(ImageModule.prototype)) { + for (const name of Object.getOwnPropertyNames( + ImageModule.prototype + ) as Array<keyof ImageModule | 'constructor'>) { if (name === 'constructor' || typeof this[name] !== 'function') { continue; } - this[name] = this[name].bind(this); + this[name] = + // @ts-expect-error: remove this expect-error when we remove the deprecated sub-modules + this[name].bind(this); } this.unsplash = new Unsplash(this.faker); |
