-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add static property elements
to entity classes
#345
feat: add static property elements
to entity classes
#345
Conversation
lib/components/basedefs.js
Outdated
import { entity } from '@sap/cds' | ||
|
||
export type ElementsOf<T> = {[name in keyof Required<T>]: entity["elements"][string]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be the same as
import { type } from '@sap/cds'
export type ElementsOf<T> = {[name in keyof Required<T>]: type}
, or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I will make the change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for this addition! :)
Enables proper access to all entity elements of the underlying
LinkedDefinition
.e.g.
new property
elements
allows access to all defined elements of the entity and access the underlyingLinkedDefinition
of those elements.