Skip to content

Incorrect types for repeated enum fields #338

@chingor13

Description

@chingor13

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions