We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5eceb29 commit 8f8501cCopy full SHA for 8f8501c
test/type/trigger.ts
@@ -3,11 +3,10 @@ import useSWR from 'swr'
3
type ExpectType = <T>(value: T) => void
4
const expectType: ExpectType = () => {}
5
6
-type Equal<A, B> = (<T>() => T extends A ? 1 : 2) extends <T>() => T extends B
7
- ? 1
8
- : 2
9
- ? true
10
- : false
+type Equal<A, B> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? true : false;
+
+// Test the Equal type
+expectType<Equal<number, string>>(false) // should be false
11
12
export function useExtraParam() {
13
useSWRMutation('/api/user', key => {
0 commit comments