Browse Source

rollback: readability

pull/22120/head
sumeyye 2 years 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) { function isOptionalProperty(prop: PropertyDef) {
const { isRequired, typeSimple } = prop; return (
if (typeSimple === 'string' || typeSimple.includes('enum')) { prop.typeSimple.endsWith('?') ||
return !isRequired; ((prop.typeSimple === 'string' || prop.typeSimple.includes('enum')) && !prop.isRequired)
} else { );
return typeSimple.endsWith('?');
}
} }
export function parseBaseTypeWithGenericTypes(type: string): string[] { export function parseBaseTypeWithGenericTypes(type: string): string[] {

Loading…
Cancel
Save