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

Disable native type mappings for wrapper types #846

Open
LauGaHo opened this issue Jun 8, 2023 · 1 comment
Open

Disable native type mappings for wrapper types #846

LauGaHo opened this issue Jun 8, 2023 · 1 comment

Comments

@LauGaHo
Copy link

LauGaHo commented Jun 8, 2023

Now if I want to generate a ts file with proto file, proto file as follow:

syntax="proto3"

import "google/protobuf/wrappers.proto"

message Person {
    google.protobuf.StringValue name;
}

the ts file as follow:

export interface Person {
    name: string | undefined;
}

but I want to get the ts file:

import {StringValue} from 'google/protobuf/wrappers'

export interface Person {
    name: StringValue;
}

So how can I do?

@stephenh
Copy link
Owner

Hi @LauGaHo ; I don't believe we have a way to disable the wrapper -> JS native type mapping. You could work on a config option/PR, which from your other docker issue, it sounds like you're attempting.

Apologies I can't be more helpful on the docker issue, but otherwise good luck on implementing this!

@stephenh stephenh changed the title StringValue generate Disable native type mappings for wrapper types Jun 13, 2023
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