After running abp generate-proxy -t ng, DTO properties that have a data type of DateOnly become "any" data type in the resulting TypeScript interfaces. In addition, it creates a system/models.ts as this:
export interface any extends any {
minValue: any;
maxValue: any;
year: number;
month: number;
day: number;
dayOfWeek: any;
dayOfYear: number;
dayNumber: number;
}
This results in the following error when trying to run the angular app:
Error: src/app/proxy/system/models.ts:2:18 - error TS2310: Type 'any' recursively references itself as a base type.
2 export interface any extends any {
~~~
Error: src/app/proxy/system/models.ts:2:18 - error TS2427: Interface name cannot be 'any'.
2 export interface any extends any {
DateOnly properties should be treated as strings in TypeScript since the .NET JSON Serializer natively supports writing DateOnly to/from string in the "yyyy-mm-dd" format.
-
ABP CLI version: v7.3.3 and v7.4.4
-
ABP Framework version: v7.3.2
-
UI Type: Angular
-
Database System: EF Core (SQL Server,
-
Tiered (for MVC) or Auth Server Separated (for Angular): yes
-
Exception message and full stack trace:
-
Steps to reproduce the issue:
3 Answer(s)
-
0
Hi
We will fix this issue, for now please use datetime and convert it to dateonly in the backend
-
0
Hello we've created issue https://github.com/abpframework/abp/issues/17923 we'll fix. I'll refund your credit after reproduce
-
0