Skip to content
New issue

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

?? doesn't allow last component to be nullable #7160

Open
eladb opened this issue Sep 23, 2024 · 0 comments
Open

?? doesn't allow last component to be nullable #7160

eladb opened this issue Sep 23, 2024 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@eladb
Copy link
Contributor

eladb commented Sep 23, 2024

I tried this:

let route: str? = spec.ingress?.path ?? spec.route;

This happened:

let route: str? = spec.ingress?.path ?? spec.route;
// -------------------------------------^^^^^^^^^^
Expected type to be "str", but got "str?" instead

I expected this:

To work

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@eladb eladb added the 🐛 bug Something isn't working label Sep 23, 2024
@monadabot monadabot added this to Wing Sep 23, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
Status: 🆕 New - not properly defined
Development

No branches or pull requests

1 participant