From 2e9ed960e3a11e4dcb78a434563fc04890c00c3d Mon Sep 17 00:00:00 2001 From: Shinigami Date: Thu, 4 May 2023 16:42:29 +0200 Subject: chore: rename generics (#2046) --- src/utils/types.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/utils') diff --git a/src/utils/types.ts b/src/utils/types.ts index 8c1bfe6b..c7aaf86c 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -3,9 +3,9 @@ * * @see https://github.com/microsoft/TypeScript/issues/29729#issuecomment-471566609 */ -export type LiteralUnion = - | T - | (U & { zz_IGNORE_ME?: never }); +export type LiteralUnion = + | TSuggested + | (TBase & { zz_IGNORE_ME?: never }); /** * A function that returns a value. @@ -22,18 +22,18 @@ export type Callable = ( /** * Type that represents a single method/function name of the given type. */ -export type MethodOf = { - [Key in keyof ObjectType]: ObjectType[Key] extends Signature +export type MethodOf = { + [Key in keyof TObjectType]: TObjectType[Key] extends TSignature ? Key extends string ? Key : never : never; -}[keyof ObjectType]; +}[keyof TObjectType]; /** * Type that represents all method/function names of the given type. */ export type MethodsOf< - ObjectType, - Signature extends Callable = Callable -> = ReadonlyArray>; + TObjectType, + TSignature extends Callable = Callable +> = ReadonlyArray>; -- cgit v1.2.3