Skip to content
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

Resolving types from sap.cds.common #52

Open
schaiet opened this issue Feb 28, 2023 · 0 comments
Open

Resolving types from sap.cds.common #52

schaiet opened this issue Feb 28, 2023 · 0 comments

Comments

@schaiet
Copy link

schaiet commented Feb 28, 2023

Hello :)

Thank you for providing this feature, it helps us a ton!

In our development we've noticed that the type Currency from @sap.cds.common is missing the import upon typescript generation. For better understanding I'll provide this code example:

using {
  Currency
} from '@sap/cds/common';
entity Books {
title: String;
price: Currency
}

this generates following typescript

export interface IBooks {
  title: string;
  price: Currencies;
  price_code?: string;
}

This is misses import { ICurrencies } from "./sap.common";. We've bypassed this for now by using Association to one Currencies instead of Currency. Might be an interesting feature to add in the future :)

Kind Regards,
Tanja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant