why “any” type extends another type will always be union type in typescript?

前端 未结 0 737
太阳男子
太阳男子 2020-11-29 16:30

example:

type A = any extends 1 ? 2 : 3 // result: type A = 2 | 3

Just curiously, why A is 2|3 rather than 2<

相关标签:
回答
  • 消灭零回复
提交回复
热议问题