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

Option to not use TypeScript Namespaces #1706

Open
pattrickrice opened this issue Aug 17, 2023 · 1 comment
Open

Option to not use TypeScript Namespaces #1706

pattrickrice opened this issue Aug 17, 2023 · 1 comment

Comments

@pattrickrice
Copy link

pattrickrice commented Aug 17, 2023

Describe the solution you'd like
It seems like enums get generated in namespaces. eg.

export namespace Pets {
    export enum pet_type {
       Cat = "Cat",
       Dog = "Dog",
    }
}

Namespaces are unnecessary at this point; in addition the TypeScript team has gone through efforts for performance improvements in their own code base by removing namespaces: microsoft/TypeScript#51387.

It would be nice to have an option to not generate namespaces.

@gergan
Copy link

gergan commented Nov 8, 2023

You could use --useUnionTypes, in this case the enums should be internalized

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

2 participants