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

User-defined types - How to define default value null but also string type as allowed #9635

Closed
slavizh opened this issue Jan 25, 2023 · 1 comment
Labels
enhancement New feature or request Needs: Triage 🔍

Comments

@slavizh
Copy link
Contributor

slavizh commented Jan 25, 2023

Is your feature request related to a problem? Please describe.
I would like to define a property that has default value of null but also to allow any string to be assigned. I was trying this:

type test = {
  foo: null | string
}

but it throws errors. If I define this:

type test = {
  foo: null
}

I cannot set a string value for foo.
If such feature is not available I would like to request it.

Describe the solution you'd like
See above.

@slavizh slavizh added the enhancement New feature or request label Jan 25, 2023
@ghost ghost added the Needs: Triage 🔍 label Jan 25, 2023
@jeskew
Copy link
Contributor

jeskew commented Jan 25, 2023

Closing as duplicate of #8973. There is an open PR for this feature (#9454), but it is blocked pending the rollout of a change in the ARM runtime and may not be included in the upcoming release.

@jeskew jeskew closed this as completed Jan 25, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

2 participants