Browse Source

fix: use `isRequired` value directly to determine the property status

pull/21951/head
sumeyye 2 years ago
parent
commit
911cffd558
  1. 2
      npm/ng-packs/packages/schematics/src/utils/model.ts

2
npm/ng-packs/packages/schematics/src/utils/model.ts

@ -182,7 +182,7 @@ export function createRefToImportReducerCreator(params: ModelGeneratorParams) {
}
function isOptionalProperty(prop: PropertyDef) {
return prop.typeSimple.endsWith('?') || (prop.typeSimple === 'string' && !prop.isRequired);
return prop.typeSimple.endsWith('?') || !prop.isRequired;
}
export function parseBaseTypeWithGenericTypes(type: string): string[] {

Loading…
Cancel
Save