googleapis / googleapis/google-cloud-node
Incorrect types for repeated enum fields
Open
library: google-cloud-node-core
priority: p2
type: bug
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
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);
```
Contributor guide
Assessment
This issue has not been assessed yet.