Open kklorenzotesta opened 6 months ago
Does this happen without importing the UI types? You can keep the UI entities in a sub-project with its own tsconfig
, via the add-project
command (with skipLibCheck
) and leave your previous tsconfig
for the backend entities that need skipLibCheck to be disabled.
I didn't want to complicate this template with sub-projects, but that's the ideal way to use the mashup support since it comes with a number of types that don't work at all on the backend and it's practically a requirement if you use it with core ui/code host support as that requires the compiler to output es6 code.
Does this happen without importing the UI types?
No, it compiles correclty if I don't add my .tsx files in the include
of the tsconfig.json
.
You can keep the UI entities in a sub-project with its own tsconfig
Thats a good idea, thank you, I'll probably go that way, I'm just trying out the new mashup support so I can easily make changes.
For now I've added a declare abstract class MashupController {}
in my code to let it compile, so it was not a big problem for me and I can split it in a subproject later.
I'll resolve this eventually and I'm surprised that having that declare statement is enough to clear the typing errors. I settled on skipLibCheck
because I couldn't get the behaviour I was going for in the mashup files without introducing them and had already spent too much time trying to solve them.
I'll look into it some more and if it's as easy as just adding an empty mashup controller class/interface I'll add it in to the next release.
When I try to compile without the
"skipLibCheck": true
in thecompilerOptions
oftsconfig.json
the build fails with:Unfortunately in my project I can't just enable
skipLibCheck
otherwise some top level functions are not correctly copied in the services that uses them, leading to runtime errors. I can't find a way to reproduce the other issue in a scale small enough to open a bug report.