We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
分布式条件类型
type IsUnion<A, B = A> = A extends A ? [B] extends A ? false : true : false
这里的 A extends A 就触发了这样的规则,联合类型 A 将其元素依次传入和 联合类型 A 比较 具体介绍看小册
type union = ['aaa', 'bbb'][number]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
当联合类型为参数并且在判断条件左边的时候就会触发
分布式条件类型
它会将每一个数单独传入做类型运算然后在合并成联合类型返回这里的 A extends A 就触发了这样的规则,联合类型 A 将其元素依次传入和 联合类型 A 比较
具体介绍看小册
The text was updated successfully, but these errors were encountered: