-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Issue with Inline Defined Types #148
Comments
Hi @tsteckenborn, did you pass the option Structured produces a type like: ...
context?: {
title?: string | null,
content?: string | null,
} | null;
... whereas flat produces: ...
context_title?: string | null
context_content?: string | null
... P.S. You can also set this option in the VS Code settings "cds.typeGenerator.command": "node \"${typerBinary}\" \"${targetFile}\" --outputDirectory \"${outputDirectory}\" --inlineDeclarations flat" @daogrady what is the reasoning behind |
Hi Ludwig, thanks for weighing in on this matter!
That is a good question. I can not find any notes on the reasoning behind this. Looking at it today, I also believe that Best, |
Hi Daniel, I thought at version 0.x.y you can basically do anything. Nothing is stable and the public API could be changed at any time. Sure, a lot of projects are probably using it right now, but I guess there is a reason you still keep at 0.x.y. Best regards, |
Hi Ludwig, yes, that is correct. 🙂 Best, |
Is there an existing issue for this?
Nature of Your Project
TypeScript
Current Behavior
Given an inline defined type, such as:
Using it within QL based on it's types, it's typed as:
Leading to implied usage as:
Yet that leads to a tried access on a column named
CONTENT
.Correct usage here would be:
This works, but yields a type error.
Expected Behavior
Return a correct type for usage within QL also for inline defined types.
Steps To Reproduce
No response
Environment
Repository Containing a Minimal Reproducible Example
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: