You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far so good, I obtain the expected common-backend.model.ts.
That is to say, I have some java fields defined as EnumMap
private Map<Language, String> synonymLabels;
that are well typed in typescript
synonymLabels?: { [P in Language]?: string };
Then, I created another gradle sub module named "businessA-generator" that aims to create a file with specific typescript classes for one of our front-end module.
Here comes my issue.
Map of enums are now typed like this:
synonymLabels?: { [index: string]: string };
Whereas I would have expected:
synonymLabels?: { [P in common.Language]: string };
Other issue, but less impactful, in case of inheritance, the properties of the mother class are repeated.
For instance, the following java code
public interface Taggable {
TagListDto getTagListDto();
}
public class OutComeTagGroup implements Taggable {
private List<String> otherTags = new ArrayList<>();
private List<String> resultCategoryTags = new ArrayList<>();
public TagListDto getTagListDto() {...}
}
Is generated into
(from common file)
export interface Taggable {
tagListDto?: TagListDto;
}
(from another business file)
export interface OutComeTagGroup extends common.Taggable {
otherTags?: string[];
resultCategoryTags?: string[];
tagListDto?: common.TagListDto;
}
Hello,
FIrst of all, thanks for this project, it is much appreciated.
I may have missed the solution to my problem in the doc, but here is my issue:
I am using typescript-generator version 3.2.1263 with gradle.
I created one gradle sub module named "common-generator" that aims to create a file with common typescript classes enums for our front-end.
I defined for it the following configuration:
So far so good, I obtain the expected
common-backend.model.ts
.That is to say, I have some java fields defined as EnumMap
that are well typed in typescript
Then, I created another gradle sub module named "businessA-generator" that aims to create a file with specific typescript classes for one of our front-end module.
I defined for it the following configuration:
Here comes my issue.
Map of enums are now typed like this:
Whereas I would have expected:
Other issue, but less impactful, in case of inheritance, the properties of the mother class are repeated.
For instance, the following java code
Is generated into
Whereas I would expect
Inheritance taking place in the same typescript generated file doesn't have this issue.
Have I missed something in the plugin configuration, or is there an issue in typescript-generator ?
Thanks in advance for your help.
I wish you a nice day :)
The text was updated successfully, but these errors were encountered: