Blob doesn't implement BlobSource interface method getBlob in TypeScript
See original GitHub issueExpected Behavior
GoogleAppsScript.Base.Blob should have getBlob()
Actual Behavior
It doesn’t
Steps to Reproduce the Problem
Utilities.gzip(Utilities.newBlob(‘text’))
Specifications
- Node version (
node -v
): v8.9.3 - Version (
clasp -v
):1.5.0 - OS (Mac/Linux/Windows): Mac
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Blob vs. Blob Source in Google Apps Script - Stack Overflow
I just want to get my type declarations correct so TypeScript continues to add value. From the documentation it looks like Blob implements...
Read more >Blob - The Modern JavaScript Tutorial
create Blob from a string let blob = new Blob(["<html>… ... The Blob interface's stream() method returns a ReadableStream which upon reading ...
Read more >Class UrlFetchApp | Apps Script - Google Developers
A script can use the URL Fetch service to issue HTTP and HTTPS requests and receive ... This method does not actually issue...
Read more >Blob | typescript - v3.7.7
A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on...
Read more >@azure/storage-blob - npm
This project provides a client library in JavaScript that makes it easy to consume Microsoft Azure Storage Blob service. Use the client ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please file a pull request on DefinitelyTyped to fix this issue.
I also get the same error
Argument of type 'Blob' is not assignable to parameter of type 'BlobSource'. Property 'getBlob' is missing in type 'Blob'.
with below code.I think the problem is the wrong function type of Utilities.unzip (and gzip, so on). The function type is currently
unzip(blob: Base.BlobSource): Base.Blob[];
, but it should beunzip(blob: Base.Blob): Base.Blob[];
. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/google-apps-script/google-apps-script.utilities.d.ts#L70 (Though JS version also set the type BlobSource instead of Blob. It would be wrong. https://developers.google.com/apps-script/reference/utilities/utilities#unzipblob)Version (clasp -v):1.6.0 Version (@types/google-apps-script): 0.0.30