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

Proto with oneof and other field is generated as union instead of intersect #235

Open
neko-para opened this issue Oct 18, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@neko-para
Copy link

message ControllerSetOptionRequest {
  optional string handle = 1;
  oneof option {
    int32 long_side = 101;
    int32 short_side = 102;
    string def_package_entry = 103;
    string def_package = 104;
  }
}
export class ControllerSetOptionRequest extends pb_1.Message {
    #one_of_decls: number[][] = [[101, 102, 103, 104], [1]];
    constructor(data?: any[] | ({} & (({
        long_side?: number;
        short_side?: never;
        def_package_entry?: never;
        def_package?: never;
    } | {
        long_side?: never;
        short_side?: number;
        def_package_entry?: never;
        def_package?: never;
    } | {
        long_side?: never;
        short_side?: never;
        def_package_entry?: string;
        def_package?: never;
    } | {
        long_side?: never;
        short_side?: never;
        def_package_entry?: never;
        def_package?: string;
    }) | ({    // <------------ Here should be &, but | is generated
        handle?: string;
    })))) {
        super();
@thesayyn thesayyn added enhancement New feature or request help wanted Extra attention is needed labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants