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
infer extends
The following code fails to compile with error Expected "?" but found end of file:
Expected "?" but found end of file
type InferUnion<T> = T extends { a: infer U extends number } | infer U extends number ? U : never
The issue seems to be with infer U extends at the top level of a union, as the following compiles fine:
infer U extends
type InferUnion<T> = T extends { a: infer U extends number } | { b: infer U extends number } ? U : never
esbuild playground
The text was updated successfully, but these errors were encountered:
35c0d65
No branches or pull requests
Issue
The following code fails to compile with error
Expected "?" but found end of file
:The issue seems to be with
infer U extends
at the top level of a union, as the following compiles fine:Reproduction
esbuild playground
The text was updated successfully, but these errors were encountered: