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: Add support for namespaced typescript interfaces #10

Closed
wants to merge 1 commit into from

Conversation

gerbal
Copy link
Contributor

@gerbal gerbal commented Jan 27, 2023

This PR adds support for TypeScript namespaces to resolve grantila/typeconv#10

Namespaces are prepended to interfaces names like "namespace.interface". This does not add support for adding namespaces back to typescript.

@grantila
Copy link
Owner

grantila commented Feb 2, 2023

Thanks! This is a bit tricky, there is no "namespace" support in GraphQL or JSON Schema, so this would produce code that wouldn't work on other platforms, well, maybe some JSON Schema consumers. "Foo.Bar" simply isn't a good name, that dot will produce problems. So we'd need to be able to configure how to handle namespaces, e.g:

  • Using members in a namespace, but dropping the namespace name(s)
  • Joining with . (as you did)
  • Joining with _ which would produce valid code in both TypeScript and GraphQL

I'll take a look at this.

@grantila grantila closed this in 3ff43f9 Feb 4, 2023
@github-actions
Copy link

github-actions bot commented Feb 4, 2023

🎉 This issue has been resolved in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

TS namespace
2 participants