microsoft / microsoft/typespec
Support default value in decorators
Open
design:needed
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
```
extern dec encode(target: unknown, encoding: string, encodedAs?: string | bytes = string);
```
Would be good to be able to do that.
To decide in design is do we want the property with default to be marked optional or not
```
extern dec encode(target: unknown, encoding: string, encodedAs?: string | bytes = string);
// vs
extern dec encode(target: unknown, encoding: string, encodedAs: string | bytes = string);
```
In typescript they have to be marked required
Contributor guide
Assessment
This issue has not been assessed yet.