You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I have implemented cds2types 3.0.0. I found one issue:
we have used types for declaring the type of fields with data type and its length in a separate file. When I executed command cds2types --cds ./srv/catalog.cds --output ./src/ --prefix I, it has created the ts files(CatalogService.ts, <namespace>.ts, other.ts and sap.common.ts.
Till here it is fine.
But when I executed npx tsc, then it gives error "error TS1005: ',' expected.".
I checked the CatalogService.ts file and found, it has import statement at line no.1, in which it has imported the fields twice.
One with types. statement and another without types. statement. It was started from second field. The first field name was coming correctly without "types." but that field was also coming twice.
When I removed the fields starting with types. and executed npx tsc, it worked fine.
Please see the below example screenshot for your reference.
Also the field names coming without types., are not coming in same format as its definition i.e. not coming in camel case.
P.S.- I tried by removing --prefix I, but seems no impact.
Best Regards
Krishan
The text was updated successfully, but these errors were encountered:
Hi Support,
Today I have implemented cds2types 3.0.0. I found one issue:
we have used types for declaring the type of fields with data type and its length in a separate file. When I executed command cds2types --cds ./srv/catalog.cds --output ./src/ --prefix I, it has created the ts files(CatalogService.ts, <namespace>.ts, other.ts and sap.common.ts.
Till here it is fine.
But when I executed npx tsc, then it gives error "error TS1005: ',' expected.".
I checked the CatalogService.ts file and found, it has import statement at line no.1, in which it has imported the fields twice.
One with types. statement and another without types. statement. It was started from second field. The first field name was coming correctly without "types." but that field was also coming twice.
When I removed the fields starting with types. and executed npx tsc, it worked fine.
Please see the below example screenshot for your reference.
Also the field names coming without types., are not coming in same format as its definition i.e. not coming in camel case.
P.S.- I tried by removing --prefix I, but seems no impact.
Best Regards
Krishan
The text was updated successfully, but these errors were encountered: