microsoft / microsoft/typespec
[compiler/typekit] TypeKits are inconsistent about allowing decorators.
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
When making types, it's generally important that decorators are actually bound to the definition of the type, rather than just called on a type (it's okay to just call decorators if you receive a type for example in a decorator implementation -- but not if you _make_ a type in which case you really have to put the decorator on the type so that it will persist if the type is cloned).
TypeKits are inconsistent about whether they accept `decorators`. At least the operation typekits do not accept `decorators`, even though operations are decorable.
All typekit `create` functions for types with decorable declarations should accept `decorators` as an argument to their descriptors:
- models
- unions
- enums
- interfaces
- operations
- namespaces
- scalars
- model properties
Contributor guide
Assessment
This issue has not been assessed yet.