-
Notifications
You must be signed in to change notification settings - Fork 16
fix: srv.entities('namespace') is not an official API
#507
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
Conversation
and will be removed in cds^10
daogrady
left a comment
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.
So from what I understand, the namespace-filter has been removed from specific services, but is still available from the cds facade.
If that is the intention, then looks good to me. Thanks! 🙂
right. the namespace filter is only available for what i was not able to reflect is that the namespace filter is still available until cds^10. |
|
So it is still available as of cds9? Then we should not remove it, but add |
yes, but how? of only the |
|
Ah, I see! That is indeed a bit tricky. // signature of a function that also has property `x` attached
type F_old = ((p: string) => number) & { x: boolean }
// type of an object that has property `x`, and can be called like a function. In that case, you can add annotations to the call signature.
type F_new = {
/** @deprecated because of reasons */
(p: string): number,
x: boolean
} |
thanks! |
| [...srv.events].map(e => e.keys); | ||
| [...srv.events].map(e => e.elements) | ||
|
|
||
| // @ts-expect-deprecation |
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.
I don't think this is a valid annotation?
microsoft/TypeScript#50369
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.
it isn't, but it should be ;)
i added for documentation purposes, but we can remove as well
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.
agree that it should be. As it does not cause any errors, let's just keep it in.
My approval stands! 🙂
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.
( = feel free to merge once you are happy with the PR's state)
and will be removed in cds^10
in general, i see a mismatch between the types for
LinkedCSNand https://cap.cloud.sap/docs/node.js/cds-reflect#linked-csn. but that can also be ignorance on my part...related docs pr: capire/docs#2267