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

expandTypeDepFree and expandTypeBabelTS don't handle JSDocNullableType #10

Open
kungfooman opened this issue Nov 3, 2023 · 0 comments
Assignees
Labels
todo to do

Comments

@kungfooman
Copy link
Owner

Working

expandType('number?')

Expected output:

{
  "type": "union",
  "members": [
    "number",
    "null"
  ]
}

Current outputs:

image

Since Babel has no support for JSDocNullableType right now and it doesn't look like they are willing to even accept a PR, it probably makes most sense to simply do type.endsWith('?') and turn it into a nullable/union-with-null: babel/babel#16073

Same for expandTypeDepFree.

@kungfooman kungfooman self-assigned this Nov 3, 2023
@kungfooman kungfooman added the todo to do label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo to do
Projects
None yet
Development

No branches or pull requests

1 participant