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 efc9f8c commit e2abfe4Copy full SHA for e2abfe4
projects/angular-odata/schematics/apigen/angular/entity.ts
@@ -16,12 +16,14 @@ export class EntityProperty {
16
constructor(protected edmType: CsdlProperty | CsdlNavigationProperty) {}
17
18
name() {
19
- return this.edmType.Name + (this.edmType.Nullable || this.edmType instanceof CsdlNavigationProperty ? '?' : '');
+ return this.edmType.Name;
20
}
21
22
type() {
23
- const type = toTypescriptType(this.edmType.Type);
24
- return type + (this.edmType.Collection ? '[]' : '');
+ let type = toTypescriptType(this.edmType.Type);
+ type += (this.edmType.Collection ? '[]' : '');
25
+ type += (this.edmType.Nullable ? ' | null' : '');
26
+ return type;
27
28
29
0 commit comments