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.
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 Z = ('x' | 1) extends (string | boolean) ? 'x' : 1; 分解为 ('x' extends string | boolean ? 'x' : 1) | (1 extends string | boolean ? 'x' : 1), 岂不是 返回 'x' | 1 了 ?
The text was updated successfully, but these errors were encountered:
1725cbb
谢谢指出,已经更正。
正确说法是这个只对泛型有效。
type T1 = 'x' | 1; type T2<T> = T extends (string | boolean) ? 'x' : 1; type T3 = T2<T1>; // 'x' | 1
Sorry, something went wrong.
No branches or pull requests
你好,按照这里说的,type Z = ('x' | 1) extends (string | boolean) ? 'x' : 1; 分解为 ('x' extends string | boolean ? 'x' : 1) | (1 extends string | boolean ? 'x' : 1), 岂不是 返回 'x' | 1 了 ?
The text was updated successfully, but these errors were encountered: