[TypeScript Codegen] Assign default value for 'class' parameter in document constructors
ZimmerA opened this issue · comments
Adrian Zimmer commented
In code generated by the TypeScript codegen(#479), if a document has a class
field, the documents' constructor should contain a default value with its class name for this field.
Example before:
export class CommandLineTool extends Saveable implements Internal.Process {
...
constructor ({extensionFields, loadingOptions, ... , class_, ...} :
{extensionFields?: Dictionary<any>, loadingOptions?: LoadingOptions, ..., class_: string, ...}) {
super()
...
this.class_ = class_
...
}
}
Example after:
export class CommandLineTool extends Saveable implements Internal.Process {
...
constructor ({extensionFields, loadingOptions, ... , class_ = "CommandLineTool", ...} :
{extensionFields?: Dictionary<any>, loadingOptions?: LoadingOptions, ..., class_: string, ...}) {
super()
...
this.class_ = class_
...
}
}
Adrian Zimmer commented
Implemented with 4d74e18