This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
HttpRequest's body only accepts Uint8Array in typescript. #334
Labels
api: cloudtasks
Issues related to the googleapis/nodejs-tasks API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Hi,
I am using v2 namespace, but this problem seems to exist in v2beta3 namespace as well. Also, this issue might be related to #331.
I cannot seem to use
HttpRequest
because its body property is expectingUint8Array
. The part ofproto.d.ts
file looks like below, and you can see that body is only expecting Uint8Array. Is this an expected behavior? Because of below type definition, my ts file is throwing the following error.Type 'string' is not assignable to type 'Uint8Array | null | undefined'
I think it would be much better if it accepts some form of string or variations of string... not
Uint8array
.What workaround can I use in this case?
Environment details
@google-cloud/tasks
version: 1.7.1The text was updated successfully, but these errors were encountered: