Open leomayer opened 9 months ago
As a follow up of #1041: I create a default constructor for the output. In my inherited children I have in the Java code the following base defintion:
children
private List<T> children = new ArrayList<>();
but somehow the assignment is not taken over for the class constructor. I only have
constructor(data: ChapterDto<T>) { this.children = data.children; }
but would prefer to have the default settings from Java take over as well. Basically the code should look like
constructor(data: ChapterDto<T>) { this.children = data.children ?? [] as T[]; }
or more generally speaking: is there a way
int
0
boolean
false
As a follow up of #1041: I create a default constructor for the output. In my inherited
children
I have in the Java code the following base defintion:but somehow the assignment is not taken over for the class constructor. I only have
but would prefer to have the default settings from Java take over as well. Basically the code should look like
or more generally speaking: is there a way
int
will be0
,boolean
will befalse
, ...)?