From e7230f6f10af9633cf0eca18910cbafaaba9ecba Mon Sep 17 00:00:00 2001 From: Shinigami Date: Wed, 15 Feb 2023 19:29:44 +0100 Subject: chore: activate noImplicitAny (#1839) --- src/modules/image/index.ts | 8 ++++++-- src/modules/image/providers/placeholder.ts | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/modules/image') 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) { 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); diff --git a/src/modules/image/providers/placeholder.ts b/src/modules/image/providers/placeholder.ts index 9691a9ff..0101e681 100644 --- a/src/modules/image/providers/placeholder.ts +++ b/src/modules/image/providers/placeholder.ts @@ -9,7 +9,9 @@ import { deprecated } from '../../../internal/deprecated'; export class Placeholder { constructor(private readonly faker: Faker) { // Bind `this` so namespaced is working correctly - for (const name of Object.getOwnPropertyNames(Placeholder.prototype)) { + for (const name of Object.getOwnPropertyNames( + Placeholder.prototype + ) as Array) { if (name === 'constructor' || typeof this[name] !== 'function') { continue; } -- cgit v1.2.3