From 8f8501ce8bfad4e8a079ad4dbe00c0b287987900 Mon Sep 17 00:00:00 2001 From: Sachin Nanayakkara Date: Thu, 23 Mar 2023 17:17:26 +0530 Subject: [PATCH] test: fix syntax error in Equal type alias implementation (#2517) * Fix syntax error in Equal type alias implementation * Fix : Adding a typing test --- test/type/trigger.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/type/trigger.ts b/test/type/trigger.ts index 6b0733925..22a4958d1 100644 --- a/test/type/trigger.ts +++ b/test/type/trigger.ts @@ -3,11 +3,10 @@ import useSWR from 'swr' type ExpectType = (value: T) => void const expectType: ExpectType = () => {} -type Equal = (() => T extends A ? 1 : 2) extends () => T extends B - ? 1 - : 2 - ? true - : false +type Equal = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? true : false; + +// Test the Equal type +expectType>(false) // should be false export function useExtraParam() { useSWRMutation('/api/user', key => {