We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b25f5 commit 4869766Copy full SHA for 4869766
src/templates/template.ts
@@ -80,8 +80,8 @@ export function classTemplate(
80
)
81
.join('')}
82
83
- constructor(data: (undefined | any) = {}){
84
- ${props.map(p => classConstructorTemplate(p.name)).join('')}
+ constructor(data: ${name} = {}){
+ Object.assign(this, data);
85
}
86
${generateValidationModel ? classValidationModelTemplate(props) : ''}
87
0 commit comments