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

pbts produces incorrect typings for message Object #1974

Open
alexander-fenster opened this issue Feb 27, 2024 · 0 comments
Open

pbts produces incorrect typings for message Object #1974

alexander-fenster opened this issue Feb 27, 2024 · 0 comments

Comments

@alexander-fenster
Copy link
Contributor

If a proto has message Object, the following code in pbts will emit lowercase object in the types, which won't compile.

name = name.replace(/\b(Object\b(?!\.))/g, function($0, $1) {
return $1.toLowerCase();
});

The resulting strings in the generated .d.ts will look like whatever.package.name.object instead of whatever.package.name.Object.

I believe the conversion from Object to object should not happen if there is a preceding . before Object, but I need to spend more time figuring out if it would be the proper fix.

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

1 participant