microsoft / microsoft/typespec

[compiler/typekit] TypeKits are inconsistent about allowing decorators.

Open
#9,772 0 comments 0 reactions 0 assignees View on GitHub
compiler:core feature triaged:core
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.