-
Notifications
You must be signed in to change notification settings - Fork 15
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
protoc-gen-tstypes: Nested enums duplication identifier & namespace issue #20
Comments
input syntax = "proto3";
package nested;
message Notification {
enum Type {
UNSPECIFIED = 0;
TEXT = 1;
VIDEO = 2;
AUDIO = 3;
}
Type message_type = 1;
string content = 2;
}
message Tweet {
enum Type {
UNSPECIFIED = 0;
ORIGINAL = 1;
RETWEET = 2;
}
Type tweet_type = 1;
string content = 2;
} the expected output should be like this ? declare namespace nested {
export enum Notification_Type {
UNSPECIFIED = "UNSPECIFIED",
TEXT = "TEXT",
VIDEO = "VIDEO",
AUDIO = "AUDIO",
}
export interface Notification {
messageType?: string;
content?: string;
}
export enum Tweet_Type {
UNSPECIFIED = "UNSPECIFIED",
ORIGINAL = "ORIGINAL",
RETWEET = "RETWEET",
}
export interface Tweet {
tweetType?: string;
content?: string;
}
} |
This is resolved by #24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Travis,
Assume we have a message definition like this:
When we compile, there will be two Enums under same namespace and
tsc
check throws this error:Output:
Do you any idea how this can get resolved without renaming enum names?
The text was updated successfully, but these errors were encountered: