Browse Source

Update optional property check in model utils

The isOptionalProperty function now only checks if a property is not required, removing the isNullable condition. This simplifies the logic for determining optional properties.
pull/24335/head
Fahri Gedik 9 months ago
parent
commit
d18a9e7006
  1. 2
      npm/ng-packs/packages/schematics/src/utils/model.ts

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

@ -190,7 +190,7 @@ export function createRefToImportReducerCreator(params: ModelGeneratorParams) {
} }
function isOptionalProperty(prop: PropertyDef) { function isOptionalProperty(prop: PropertyDef) {
return !prop.isRequired && prop.isNullable; return !prop.isRequired;
} }
export function parseBaseTypeWithGenericTypes(type: string): string[] { export function parseBaseTypeWithGenericTypes(type: string): string[] {

Loading…
Cancel
Save