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
TypeScript Version: 3.6.0-dev
Code
declare function foo<T>(x: T | Promise<T>): void; declare let x: false | Promise<true>; foo(x); // Error, 'false | Promise<true>' not assignable to 'true | Promise<true>' declare function bar<T>(x: T, y: string | T): T; const y = bar(1, 2); // Error, '2' not assignable to 'string | 1'
Expected behavior: No errors.
Actual behavior: Errors as noted above.
Playground Link: https://www.typescriptlang.org/play/index.html#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVJxwB4AVAPgAoAPALnhPgB94AFGHAWywGcRSyAlHQBuOLMADcAWABQoSLAQQQGeLSRQIvJq3ZdeRDDGQgy0mYkLUBE+PAD09+AFEY7GLNnzocJGky4+ABGsPzUdCQANPAAnnTcRlioAOY6JEL05mB4CbHwALzwITAUAIzRAEw2do4ubjgeMkA
Related Issues: Discovered in #32386.
The text was updated successfully, but these errors were encountered:
ahejlsberg
Successfully merging a pull request may close this issue.
TypeScript Version: 3.6.0-dev
Code
Expected behavior: No errors.
Actual behavior: Errors as noted above.
Playground Link: https://www.typescriptlang.org/play/index.html#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVJxwB4AVAPgAoAPALnhPgB94AFGHAWywGcRSyAlHQBuOLMADcAWABQoSLAQQQGeLSRQIvJq3ZdeRDDGQgy0mYkLUBE+PAD09+AFEY7GLNnzocJGky4+ABGsPzUdCQANPAAnnTcRlioAOY6JEL05mB4CbHwALzwITAUAIzRAEw2do4ubjgeMkA
Related Issues: Discovered in #32386.
The text was updated successfully, but these errors were encountered: