You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ Date }=cds.builtin.types// -> const Date: objectconst{ today }=cds.builtin.types.Date// -> Property 'today' does not exist on type '{}'.ts(2339)
It returns '2024-12-04', so a string. If you debug into the function, it's part of cds and runs (new Date).toISOString().slice(0,10). It can be set to a Date field.
We should consider things that are not documented on CAPire non-public -- unless they have been forgotten, obviously. 🙂 @mariayord could you please let us know if cds.Date::today is supposed to be public API?
Is there an existing issue for this?
Current Behavior
Expected Behavior
Proper types for
cds.builtin.types
References
https://github.com/SAP-samples/cap-sflight/blob/5154e2eece13485cfaa9f6ea041b3e6f81276743/srv/travel-service.ts#L9
Versions
Anything else? Logs?
No response
The text was updated successfully, but these errors were encountered: