Open Closed

Generation of Service Proxies for Angular not handling DateOnly properties correctly #5965


User avatar
0
dmannion created

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:
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

3 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hi

    We will fix this issue, for now please use datetime and convert it to dateonly in the backend

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    masum.ulu created
    Angular Expert

    Hello we've created issue https://github.com/abpframework/abp/issues/17923 we'll fix. I'll refund your credit after reproduce

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    masum.ulu created
    Angular Expert

    https://github.com/abpframework/abp/pull/17981 here's PR

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.