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 => {