{"ref":"capability:typing","page":"/capabilities/typing","json":"/capabilities/typing.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"typing","name":"Typing","domain":"developer-experience","ecosystems":["cap"],"universal":true,"description":"Making the model visible to the compiler — generated types for entities and events so a rename breaks the build rather than production.","short":"Generated types that make the model visible to the compiler","core_coverage":{"state":"core-and-community","assessed_at":"2026-09-20","what_core_does":"On Node.js, [@cap-js/cds-types](artifact:cap-js-cds-types) holds the TypeScript declarations for the @sap/cds APIs, and [@cap-js/cds-typer](artifact:cap-js-cds-typer) generates types from the CDS model, a singular and a plural form per entity, for TypeScript projects and for JavaScript projects that set checkJs. On Java, [com.sap.cds:cds-maven-plugin](artifact:cap-java-cds-maven-plugin) generates an accessor interface for every structured type of the model, by default at build time.","where_it_stops":"On Node.js it stops at what capire calls \"a certain degree of type safety\": the declarations in [@cap-js/cds-types](artifact:cap-js-cds-types) trail the latest @sap/cds release, with gaps and errors capire announces itself, and every property of a type generated by [@cap-js/cds-typer](artifact:cap-js-cds-typer) is optional by default. Past that edge [cds-internal-tool](artifact:soontao-cds-internal-tool) publishes its own \"fresh cds runtime types\" for authors of CAP extensions, and on Java any data read as a plain Map keeps its element names unchecked until runtime.","sources":[{"url":"https://cap.cloud.sap/docs/tools/cds-typer","title":"CDS Typer","checked":"2026-09-20","quote":"Per default, all properties of emitted types are set to be optional. This reflects how entities can be partial in handlers."},{"url":"https://cap.cloud.sap/docs/node.js/typescript","title":"Using TypeScript","checked":"2026-09-20","quote":"Still, as @sap/cds is a JavaScript library, typings aren't always up to date. You should expect a delay for typings related to the latest release, even gaps, and errors."},{"url":"https://cap.cloud.sap/docs/node.js/typescript","title":"Using TypeScript","checked":"2026-09-20","quote":"The cds-typer package offers a way to derive TypeScript definitions from a CDS model to give you enhanced code completion and a certain degree of type safety when implementing services."},{"url":"https://cap.cloud.sap/docs/java/cds-data","title":"Working with CDS Data","checked":"2026-09-20","quote":"For all structured types of the CDS model, accessor interfaces can be generated using the CDS Maven Plugin."},{"url":"https://registry.npmjs.org/cds-internal-tool","title":"cds-internal-tool 1.7.9, README in the npm registry","checked":"2026-09-20","quote":"fresh `cds` runtime types"}],"relationship":"unassessed"},"history":[{"date":"2026-08-31","field":"core_coverage.state","from":"core","to":"core-only","reason":"States renamed to describe who is present rather than to interpret intent. left-open-on-purpose asserted a motive; core-and-community states a fact, with relationship carrying the intent separately."},{"date":"2026-09-20","field":"core_coverage.state","from":"core-only","to":"core-and-community","reason":"cds-internal-tool, an independent package, carries a provides edge to this capability on CAP beside the three sap-official providers, so core-only no longer says who is present. relationship is unassessed: no retrieved page gives the history between the two."}],"drafted_with_ai":true},"sap_delivery":{"door":"cap","all":{"built_in":[],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:cap-js-cds-typer","name":"@cap-js/cds-typer","json":"/artifacts/cap-js-cds-typer.json"},{"ref":"artifact:cap-js-cds-types","name":"@cap-js/cds-types","json":"/artifacts/cap-js-cds-types.json"},{"ref":"artifact:cap-java-cds-maven-plugin","name":"com.sap.cds:cds-maven-plugin","json":"/artifacts/cap-java-cds-maven-plugin.json"}]},"by_flavor":{"node":{"built_in":[],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:cap-js-cds-typer","name":"@cap-js/cds-typer","json":"/artifacts/cap-js-cds-typer.json"},{"ref":"artifact:cap-js-cds-types","name":"@cap-js/cds-types","json":"/artifacts/cap-js-cds-types.json"}]},"java":{"built_in":[],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:cap-java-cds-maven-plugin","name":"com.sap.cds:cds-maven-plugin","json":"/artifacts/cap-java-cds-maven-plugin.json"}]}}},"edges":{"use_cases":[],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:cap-js-cds-typer","name":"@cap-js/cds-typer","json":"/artifacts/cap-js-cds-typer.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:cap-js-cds-types","name":"@cap-js/cds-types","json":"/artifacts/cap-js-cds-types.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:soontao-cds-internal-tool","name":"cds-internal-tool","json":"/artifacts/soontao-cds-internal-tool.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:cap-java-cds-maven-plugin","name":"com.sap.cds:cds-maven-plugin","json":"/artifacts/cap-java-cds-maven-plugin.json","ecosystem":"cap","origin_ring":"sap-official"}],"samples":[{"ref":"artifact:miyasuta-cap-cds-typer","name":"cap-cds-typer","json":"/artifacts/miyasuta-cap-cds-typer.json"},{"ref":"artifact:gregorwolf-cap-typescript","name":"cap-typescript","json":"/artifacts/gregorwolf-cap-typescript.json"},{"ref":"artifact:gregorwolf-sap-npm-api-collection","name":"SAP-NPM-API-collection","json":"/artifacts/gregorwolf-sap-npm-api-collection.json"}],"explained_by":[{"ref":"content:exploring-the-typescript-ecosystem-with-cds-typer-part-2","name":"Exploring the TypeScript Ecosystem with @cap-js/cds-typer, cds-ts, and node-ts Part - 2","json":"/content/exploring-the-typescript-ecosystem-with-cds-typer-part-2.json"},{"ref":"content:exploring-the-typescript-ecosystem-with-cds-typer-part-1","name":"Exploring the TypeScript Ecosystem with @cap-js/cds-typer, cds-ts, and node-ts","json":"/content/exploring-the-typescript-ecosystem-with-cds-typer-part-1.json"},{"ref":"content:typescript-sheriff-how-can-i-use-typescript-in-the-sap-ecosystem","name":"TypeScript Sheriff: How can I use TypeScript in the SAP ecosystem? (Part 2 of 3)","json":"/content/typescript-sheriff-how-can-i-use-typescript-in-the-sap-ecosystem.json"}],"normative_context":[]}}