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

No way to denote optional function type #3183

Closed
MarkMcCulloh opened this issue Jun 30, 2023 · 1 comment
Closed

No way to denote optional function type #3183

MarkMcCulloh opened this issue Jun 30, 2023 · 1 comment
Labels
🐛 bug Something isn't working 🛠️ compiler Compiler

Comments

@MarkMcCulloh
Copy link
Contributor

MarkMcCulloh commented Jun 30, 2023

I tried this:

Let's set I want to declare a type to be an function:

let x: (): num

There is no way to make x (the function sig) optional. The following makes the return type optional:

let x: (): num?

This happened:

Nothing

I expected this:

To have some way to denote this.

Is there a workaround?

No

Component

Language Design, Compiler

Wing Version

No response

Wing Console Version

No response

Node.js Version

No response

Platform(s)

No response

Anything else?

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.
@MarkMcCulloh MarkMcCulloh added the 🐛 bug Something isn't working label Jun 30, 2023
@monadabot monadabot added this to Wing Jun 30, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Jun 30, 2023
@staycoolcall911 staycoolcall911 moved this from 🆕 New - not properly defined to 🤝 Backlog - handoff to owners in Wing Jul 2, 2023
@staycoolcall911
Copy link
Contributor

Duplicates #3115

@staycoolcall911 staycoolcall911 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2023
@github-project-automation github-project-automation bot moved this from 🤝 Backlog - handoff to owners to ✅ Done in Wing Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🛠️ compiler Compiler
Projects
Archived in project
Development

No branches or pull requests

2 participants