You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A screenshot that you have tested with "Try this API".
This is a problem with declared types, not with running the API
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
This is a problem with declared types, not with running the API
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
Call await new DNS(...).zone('...').getRecords()
Compare actual responses to the declared types for the returned Records and their metadata: RecordMetadata fields:
Record.data is typically an array of strings, not a single non-array object. The fact that it's an array is clear from the constructors in the source that assign it based on rrdatas, which is declared as an array
rrdatas in the REST API are clearly declared as strings, but this library declares them as {} (object)
As such it's very hard to use at least this part of the library without casting everything to any or otherwise turning off type checking, defeating the point of having types.
A clear and concise description of what the bug is, and what you expected to happen.
The types for objects returned from API calls should match the API
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
That's the whole point of having types, to tell you what fields exist and what types of values they are supposed to contain
The text was updated successfully, but these errors were encountered:
Please make sure you have searched for information in the following guides.
A screenshot that you have tested with "Try this API".
This is a problem with declared types, not with running the API
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
This is a problem with declared types, not with running the API
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
await new DNS(...).zone('...').getRecords()
Record
s and theirmetadata: RecordMetadata
fields:Record.data
is typically an array of strings, not a single non-array object. The fact that it's an array is clear from the constructors in the source that assign it based onrrdatas
, which is declared as an arrayRecordMetadata
has anrrdatas
field commonly, not adata
one as declared. Clearly visible in the underlying API documentation: https://cloud.google.com/dns/docs/reference/rest/v1/resourceRecordSets#ResourceRecordSetrrdatas
in the REST API are clearly declared as strings, but this library declares them as{}
(object)As such it's very hard to use at least this part of the library without casting everything to
any
or otherwise turning off type checking, defeating the point of having types.A clear and concise description of what the bug is, and what you expected to happen.
The types for objects returned from API calls should match the API
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
That's the whole point of having types, to tell you what fields exist and what types of values they are supposed to contain
The text was updated successfully, but these errors were encountered: