googleapis / googleapis/google-cloud-node

refactor: have only one descriptors object

Open
#7,795 0 comments 0 reactions 0 assignees View on GitHub
library: google-cloud-node-core type: feature request
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

Right now, the generated code has a non-trivial descriptor object such as

```ts
class Client {
...
descriptors: {
page: { ... },
stream: { ... },
longrunning: { ... },
batching: { ... },
}
...
}
```

This is actually an overcomplicated object since a method can only be paging, or streaming, or longrunning, or support batching, but not two of those at the same time. We need to replace it with just one descriptors object (key: method name, value: any descriptor).

This will formally be a breaking change because someone could depend on a given descriptor present (we actually gave some advice about that long time ago), so this should wait till the next major version bump.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.