cds-typer
cds-typer copied to clipboard
[IMPROVEMENT] Remove `.drafts` Property From Entities That Are Not Actually Draftable
Follow-up to: https://github.com/cap-js/cds-typer/issues/34
.drafts
should only be present in entities that can actually be draftable. Currently, entities that aren't actually draftable might end up with a .drafts
property.
- [ ] check with the compiler team whether there is a surefire way to determine an entity's draftability
- [ ] if possible, get rid of the current voodoo where we propagate annotations through the CSN
- [ ] make sure a static
.drafts
property is only exposed when the entity can actually be drafted during runtime