Browse Source

rollback: readability

pull/22120/head
sumeyye 1 year ago
parent
commit
e996cf907e
  1. 10
      npm/ng-packs/packages/schematics/src/utils/model.ts

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

@ -187,12 +187,10 @@ export function createRefToImportReducerCreator(params: ModelGeneratorParams) {
}
function isOptionalProperty(prop: PropertyDef) {
const { isRequired, typeSimple } = prop;
if (typeSimple === 'string' || typeSimple.includes('enum')) {
return !isRequired;
} else {
return typeSimple.endsWith('?');
}
return (
prop.typeSimple.endsWith('?') ||
((prop.typeSimple === 'string' || prop.typeSimple.includes('enum')) && !prop.isRequired)
);
}
export function parseBaseTypeWithGenericTypes(type: string): string[] {

Loading…
Cancel
Save