Any idea why the response types are different from the typescript types generated from protobufs?
According to the typescript bindings, I'm supposed to be receiving a response like:
{
results: IResult[]
total_size: number
next_page_token: ...
}
but at runtime, the response is actually:
// IResult[]
[
{
text: "someStringValue",
someField: "someStringValue"
},
{
text: "someStringValue",
someField: "someStringValue"
}, ...
]
Seems like there's some autopagination destructuring going on, which is honestly great, but the type mismatch makes it very leaky to use.
Also if there's a number | null type, runtime will actually have a string. Wondering if I missed some JSON parsing step here?
Any idea why the response types are different from the typescript types generated from protobufs?
According to the typescript bindings, I'm supposed to be receiving a response like:
but at runtime, the response is actually:
Seems like there's some autopagination destructuring going on, which is honestly great, but the type mismatch makes it very leaky to use.
Also if there's a
number | nulltype, runtime will actually have a string. Wondering if I missed some JSON parsing step here?