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/utils/types.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/types.ts b/src/utils/types.ts index 012ad58b..afc4c17a 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -8,11 +8,16 @@ export type LiteralUnion = | (U & { zz_IGNORE_ME?: never }); /** - * Basically a function that returns a value. + * A function that returns a value. * - * For some strange reason this is not the same as `Function`. + * `Function` cannot be used instead because it doesn't accept class declarations. + * These would fail when invoked since they are invoked without the `new` keyword. */ -export type Callable = (...args) => unknown; +export type Callable = ( + // TODO christopher 2023-02-14: This `any` type can be fixed by anyone if they want to. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ...args: any[] +) => unknown; /** * Type that represents a single method/function name of the given type. -- cgit v1.2.3