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

Allow generated types to be namespaced #71

Open
darrell-roberts opened this issue Mar 3, 2023 · 3 comments
Open

Allow generated types to be namespaced #71

darrell-roberts opened this issue Mar 3, 2023 · 3 comments
Labels
feature-request A request for a new feature

Comments

@darrell-roberts
Copy link
Member

Today all generated types will be put in a single module. I'd like to be able to allow types to optionally be defined in separate namespaces/modules.

For example for Typescript.

#[typeshare::typeshare(namespace = mymodule)]
pub struct MyType {
    some_field: String
};

File mymodule.ts

export interface MyType {
    someField: string
}
@snowsignal snowsignal added the feature-request A request for a new feature label Mar 3, 2023
@lukaszlew
Copy link

Just came here to create the same Feature Request. :)

@darrell-roberts
Copy link
Member Author

I have an approach that generates module files per source crate: darrell-roberts#4. This is a prototype right now. There are further changes that would have to be made to make this an add on feature so no to impact existing behavior.

@darrell-roberts
Copy link
Member Author

Moved to MR #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants