Open mcastrup opened 10 months ago
Is the issue fixed if you import sap.common.Currencies
from @sap/cds/common
instead of @sap/cds-common-content
? The definition will be the same.
Hi @hakimio
I changed the import as you suggested to
using {sap.common.Currencies} from '@sap/cds/common';
However, the error still exists.
Hi Michael,
this issue is actually closely related to https://github.com/cap-js/cds-typer/issues/77
Localisation and text properties are not supported by cds-typer at this point in time. So it is to be expected that their type is incorrect. I am more suprised that cds-typer attempts to generate them regardless, as we are currently skipping them. I will look into it.
Best, Daniel
Hi Daniel,
do you have an idea, when this issue will be fixed? It currently blockes our build process.
Thanks and best regards, Michael
Hi Michael,
sorry, I am afraid not any time soon from my side, as I have to prioritise another project for an upcoming release. If you would like to submit a PR to address the problem, I will make sure to carve out some time to review it to make sure the issue is fixed asap.
Best Daniel
This issue has not been updated in a while. If it is still relevant, please comment on it to keep it open. The issue will be closed soon if it remains inactive.
Is there an existing issue for this?
Nature of Your Project
TypeScript
Current Behavior
In one of the generated files, there are two errors regarding the import and usage of "Currencies":
Error message: '"c:/Users/D048091/git/crypto-for-business/@cds-models/sap/common/index"' has no exported member named 'Currencies'. Did you mean 'Currency'?
The code can be also seen in this file:
The related entity to the
FiatCurrency
class is:See also this file.
Expected Behavior
I'm not sure what is the correct code. Of course, there should be no errors.
Steps To Reproduce
You can clone our repository crypto-for-business locally with
git clone https://github.tools.sap/erp4sme/crypto-for-business.git
, checkout the branchswitch_to_typer_prototype
and runnpm ci
andnpm run cds-typer:dev
Environment
Repository Containing a Minimal Reproducible Example
No response
Anything else?
No response