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

Incorrect types for repeated enum fields #1205

Open
chingor13 opened this issue Mar 21, 2022 · 0 comments
Open

Incorrect types for repeated enum fields #1205

chingor13 opened this issue Mar 21, 2022 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@chingor13
Copy link
Contributor

An enum field usually has a type like: https://github.com/googleapis/nodejs-web-risk/blob/c3c2f0638124d2e876ee36925e5766e1c7dc447b/protos/protos.d.ts#L141

threatType?: (google.cloud.webrisk.v1.ThreatType|keyof typeof google.cloud.webrisk.v1.ThreatType|null);

A repeated enum field does not have the keyof typeof part of the union: https://github.com/googleapis/nodejs-web-risk/blob/c3c2f0638124d2e876ee36925e5766e1c7dc447b/protos/protos.d.ts#L571

threatTypes?: (google.cloud.webrisk.v1.ThreatType[]|null);
@chingor13 chingor13 added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 21, 2022
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants