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
Hi, and thanks for developing and maintaining typescript-generator! It's been an incredibly useful tool for generating TypeScript definition files from Java classes, especially for use cases involving JSON object mapping and static type checking in TypeScript.
However, I’ve noticed that currently, typescript-generator focuses primarily on generating TypeScript interfaces based on the fields (properties) of Java classes, but it doesn't generate TypeScript method signatures for the methods defined in these Java classes.
I would like to request that typescript-generator be extended to also generate method signatures in the TypeScript definition files. Using the example above, the desired output would include the method signature as follows:
Completeness: Many Java classes contain methods that perform important operations, and these methods are often integral to the class's functionality. Including method signatures in the generated TypeScript interfaces would provide a more complete representation of the Java class, reducing the need to manually extend the generated .d.ts files.
Consistency with Class Usage: In many TypeScript projects, it’s common to need both the data structure (fields) and the functionality (methods) provided by a Java class. Including methods would allow developers to fully type-check their TypeScript code that interacts with these Java classes.
Thank you for considering this request! This feature would greatly improve the usability of typescript-generator for projects that rely on Java methods in addition to fields.
Looking forward to your feedback and insights!
The text was updated successfully, but these errors were encountered:
Description:
Hi, and thanks for developing and maintaining
typescript-generator
! It's been an incredibly useful tool for generating TypeScript definition files from Java classes, especially for use cases involving JSON object mapping and static type checking in TypeScript.However, I’ve noticed that currently,
typescript-generator
focuses primarily on generating TypeScript interfaces based on the fields (properties) of Java classes, but it doesn't generate TypeScript method signatures for the methods defined in these Java classes.For example, given the following Java class:
The output TypeScript interface would be:
Requested Feature:
I would like to request that
typescript-generator
be extended to also generate method signatures in the TypeScript definition files. Using the example above, the desired output would include the method signature as follows:Why This Feature is Important:
Completeness: Many Java classes contain methods that perform important operations, and these methods are often integral to the class's functionality. Including method signatures in the generated TypeScript interfaces would provide a more complete representation of the Java class, reducing the need to manually extend the generated
.d.ts
files.Consistency with Class Usage: In many TypeScript projects, it’s common to need both the data structure (fields) and the functionality (methods) provided by a Java class. Including methods would allow developers to fully type-check their TypeScript code that interacts with these Java classes.
Thank you for considering this request! This feature would greatly improve the usability of
typescript-generator
for projects that rely on Java methods in addition to fields.Looking forward to your feedback and insights!
The text was updated successfully, but these errors were encountered: