cap-cds-typer
A CAP service in TypeScript whose handlers import Books and Order from #cds-models/CatalogService, the types @cap-js/cds-typer@cap-js/cds-typerGenerates TypeScript types from a CDS model.sap official, cap generates from the model.
Three files make that import resolve: @cap-js/cds-typer@cap-js/cds-typerGenerates TypeScript types from a CDS model.sap official, cap as a devDependency, an imports map for #cds-models/* in package.json, and the same path under compilerOptions.paths in tsconfig.json. The service itself is short: Books read-only, Orders draft-enabled with amount annotated FieldControl: #ReadOnly, and a before-CREATE handler that reads a book's price through the generated entity and multiplies it by the quantity. build:cf chains cds build --production, a rimraf of the generated .ts under gen/srv/srv, then tsc. The README is the CAP scaffold's own getting-started text, so the wiring and that one handler are the whole of it.
Facts
Where it sits
Who is behind it
In the atlas: maintains 47, contributes to 47, wrote 10@miyasutamaintainer
What it declares
Every artifact
- Type
- Sample
- Origin
- Independently maintained
- Use as
- A reference
- Runtime
- Node.js
- Runs on
- Cloud Foundry
As a sample
- Declared for
- ^7
- Form
- does not say
Connections
Generated types that make the model visible to the compiler
Generates TypeScript types from a CDS model
Download
README
quoted from miyasuta/cap-cds-typer, readGetting Started
Welcome to your new project.
It contains these folders and files, following our recommended project layout:
| File or Folder | Purpose |
|---|---|
app/ | content for UI frontends goes here |
db/ | your domain models and data go here |
srv/ | your service models and code go here |
package.json | project metadata and configuration |
readme.md | this getting started guide |
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
History in the atlas
- First seen.
For your agent
- Ref
artifact:miyasuta-cap-cds-typer- JSON
- /artifacts/miyasuta-cap-cds-typer.json
- MCP
- Connecting an agent