Skip to content

[SUGGESTION] Types for cds.builtin.types #359

@Akatuoro

Description

@Akatuoro

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

const { Date } = cds.builtin.types
// -> const Date: object
const { today } = cds.builtin.types.Date
// -> Property 'today' does not exist on type '{}'.ts(2339)

Expected Behavior

Proper types for cds.builtin.types

References

https://github.com/SAP-samples/cap-sflight/blob/5154e2eece13485cfaa9f6ea041b3e6f81276743/srv/travel-service.ts#L9

Versions

@capire/sflight https://github.com/SAP-samples/cap-sflight
@cap-js/cds-typer 0.29.0
@cap-js/cds-types 0.8.0
@cap-js/db-service 1.16.0
@cap-js/hana 1.5.0
@cap-js/sqlite 1.7.7
@sap/cds 8.5.0
@sap/cds-compiler 5.5.0
@sap/cds-fiori 1.2.8
@sap/cds-foss 5.0.1
@sap/cds-mtxs 2.3.1
CAP Java SDK 3.5.0
Java 21.0.5, home: /Library/Java/JavaVirtualMachines/sapmachine-21.
Maven 3.6.3
Node.js v22.7.0
OS Mac OS X, 14.6.1, arch: x86_64
Spring Boot 3.4.0
cds4j 3.5.0

Anything else? Logs?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions