cds-typer
cds-typer copied to clipboard
[BUG] structured inline declarations not working
Is there an existing issue for this?
- [X] I have searched the existing issues
Nature of Your Project
TypeScript
Current Behavior
Based on cds typer we have a project in which we have deep structures in an entity. So far it has always worked. Unfortunately, this no longer works properly since the last update.
If we set the following parameter to flat, it works. However, this would mean that we would have to work in many places in the project.
--inlineDeclarations: <flat | structured> (default: structured) Whether to resolve inline type declarations flat: (x_a, x_b, ...) or structured: (x: {a, b})
example: https://cap.cloud.sap/docs/guides/domain-modeling#prefer-flat-models in the debugger this results in
companyData_name: ...
not in
companyData: {name: ...}
the types are generated correctly in the ts and js file, but not at runtime
Expected Behavior
working structured types
Steps To Reproduce
No response
Environment
BAS with
@cap-js/cds-typer: 0.19.0
@cap-js/cds-types: 0.2.0
@cap-js/sqlite: 1.6.0
@sap/cds: 7.8.0
@sap/cds-compiler: 4.8.0
@sap/cds-dk: 7.8.1
@sap/cds-dk (global): 7.8.1
@sap/cds-fiori: 1.2.3
@sap/cds-foss: 5.0.0
@sap/cds-hana: 2.0.0
@sap/cds-mtxs: 1.17.0
@sap/eslint-plugin-cds: 2.6.7
Node.js: v18.14.2
Repository Containing a Minimal Reproducible Example
No response
Anything else?
No response