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

[ALL] Provide a way to add extra known types to the TS generators. #10

Open
JabX opened this issue Jun 9, 2018 · 0 comments
Open

[ALL] Provide a way to add extra known types to the TS generators. #10

JabX opened this issue Jun 9, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@JabX
Copy link
Contributor

JabX commented Jun 9, 2018

OOM domain definitions carry the C# and DB types, but we still rely on hardcoded translations to generate their TS counterparts, and the behaviour is currently different between the model and service generators. The latter doesn't actually use anything from the OOMs and rely 100% on the C# definitions, which may not necessarily come from the model. It works fine when the non basic types we use are entity types from the model, but when they aren't we're not sure how to translate them from C# to TS.

Currently, the ModGen generates "any" when it doesn't know the TS type associated to a domain, and the ServiceGen generates an import based on the C# namespace for any non standard C# type it encounters (there are special cases for Focus and static reference types, but this is designed to work out of the box for model generated types)

Having said that, we can't simply add TS types to the domains to solve this issue, so we'll need a way to specify custom C# -> TS translations that will be used by both generators. It could be added to the unified config file from #9.

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

No branches or pull requests

2 participants