Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Option to Generate TypeScript as export interface or export type #408

Open
bigmommyelven opened this issue Dec 15, 2024 · 0 comments

Comments

@bigmommyelven
Copy link

bigmommyelven commented Dec 15, 2024

First of all, thank you for your fantastic work on this library!

I would like to suggest a feature enhancement that would allow users to choose between generating TypeScript definitions as export interface or export type. Currently, the generator produces TypeScript definitions in a specific format (e.g., class), but having the flexibility to toggle between interface and type would make this tool even more versatile and better aligned with different project requirements and coding styles.

Proposed Feature
Introduce an option (eg: [JSExport(AsInterface: true)]) that allows users to specify whether TypeScript definitions should be generated as:

[JSExport(AsInterface: true)]
public class SomeDto
{
	public string Name { get; set; }
}

// Typescript
export interface SomeDto
export type SomeType

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant