ts challenges 43 #30770
ts challenges 43
#30770
-
why this "test" type is "a"? i think it should be "never" |
Beta Was this translation helpful? Give feedback.
Answered by
kazunetakeda25
Nov 14, 2023
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
0xpudgy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
T extends (U | infer A)
is alwaystrue
.T
inferred to beA
because(U | infer A)
is union.That is,
T
expandsT
. So it becomes true.