Skip to content

Commit

Permalink
🐛 Adds missing blob type
Browse files Browse the repository at this point in the history
  • Loading branch information
Anwesha Naskar authored and Anwesha Naskar committed Jan 31, 2018
1 parent 291bdc4 commit 92c884e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ authorization/*.js
index.js
.nyc_output
**/*.d.ts
!*/blob.d.ts
**/*.js.map
17 changes: 17 additions & 0 deletions lib/blob.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
interface Blob {
readonly size: number;
readonly type: string;
msClose(): void;
msDetachStream(): any;
slice(start?: number, end?: number, contentType?: string): Blob;
}

declare var Blob: {
prototype: Blob;
new (blobParts?: any[], options?: BlobPropertyBag): Blob;
};

interface BlobPropertyBag {
type?: string;
endings?: string;
}
2 changes: 1 addition & 1 deletion lib/content-type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { extname } from 'path';

/// <reference path="../blob.d.ts" />
/// <reference path="blob.d.ts" />

// This module attempts to identify common content-types based on the filename or header
// It is not exhaustive, and for best results, you should always manually specify the content-type option.
Expand Down
2 changes: 1 addition & 1 deletion speech-to-text/v1-generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference path="../blob.d.ts" />
/// <reference path="../lib/blob.d.ts" />

import * as extend from 'extend';
import { RequestResponse } from 'request';
Expand Down

0 comments on commit 92c884e

Please sign in to comment.