From 8ae65f2aab3dd5c613d8f474ccd32cb39d6a96cb Mon Sep 17 00:00:00 2001 From: Geoff Date: Fri, 26 Jul 2024 23:17:28 -0400 Subject: [PATCH] `npm run fix` --- src/utils.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 5c05d1e1..412a1ba4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -200,7 +200,9 @@ export function* run( */ export type UnionToIntersection = ( - U extends any ? (arg: U) => any : never + U extends any + ? (arg: U) => any + : never ) extends (arg: infer I) => void ? I : never @@ -230,10 +232,11 @@ export type IsMatch = T extends G ? (G extends T ? T : never) : never * Check if a type is an exact match. */ -export type IsExactMatch = - (() => G extends T ? 1 : 2) extends () => G extends U ? 1 : 2 - ? T - : never +export type IsExactMatch = (() => G extends T ? 1 : 2) extends < + G, +>() => G extends U ? 1 : 2 + ? T + : never /** * Check if a type is a record type. @@ -265,7 +268,11 @@ export type IsTuple = T extends [any] */ export type IsUnion = ( - T extends any ? (U extends T ? false : true) : false + T extends any + ? U extends T + ? false + : true + : false ) extends false ? never : T