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

Move this project and generate result to ESM #532

Open
horiuchi opened this issue Mar 1, 2022 · 2 comments
Open

Move this project and generate result to ESM #532

horiuchi opened this issue Mar 1, 2022 · 2 comments

Comments

@horiuchi
Copy link
Owner

horiuchi commented Mar 1, 2022

There's one big problem.

  • We need to remove namespace from the generated results. In that case, how do we guarantee the uniqueness of the output type names?

via. https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm

@tfohlmeister
Copy link

One easy option would be to prefix every type / interface name with the namespace name. So for example

namespace Responses {
   export type BadRequest = any;
}

becomes

export type ResponsesBadRequest = any;

That would not necessarly guarantee uniquenesss but should work for most setups.

@horiuchi
Copy link
Owner Author

Thanks for the good ideas. 👍
The name will be much longer, but I think I can guarantee uniqueness.

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