User-defined types -How to define default value
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Is your feature request related to a problem? Please describe.**
We can define the following type:
```bicep
type test = {
foo: true
}
```
But when you use intellisense on the foo property you get:

Instead what I want to get is that foo is boolean and default value is true.
What if I also want to define default value that uses Bicep function like:
```bicep
type test = {
foo: subscription().subscriptionId
}
```
**Describe the solution you'd like**
See above.
Contributor guide
Research direction
No implementation files or tests are named. Start by reviewing the user-defined type examples and the IntelliSense behavior described in the issue, then determine how literal and function-based defaults should be represented. Done means the editor reports both the property type and its default value consistently for the shown examples.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100