From 85c339b16f12d33f4ace6eaa6fe8607509d32724 Mon Sep 17 00:00:00 2001 From: Eric HILLAH Date: Thu, 2 Jul 2015 17:18:07 +0200 Subject: [PATCH] Adds blob-stream definition files --- blob-stream/blob-stream-tests.ts | 6 ++++++ blob-stream/blob-stream.d.ts | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 blob-stream/blob-stream-tests.ts create mode 100644 blob-stream/blob-stream.d.ts diff --git a/blob-stream/blob-stream-tests.ts b/blob-stream/blob-stream-tests.ts new file mode 100644 index 000000000..85878c023 --- /dev/null +++ b/blob-stream/blob-stream-tests.ts @@ -0,0 +1,6 @@ +/// + +var bl = BlobStream(); + +var blob = bl.toBlob("aplication/PDF"); +var brl = bl.toBlobURL("app/JSON"); \ No newline at end of file diff --git a/blob-stream/blob-stream.d.ts b/blob-stream/blob-stream.d.ts new file mode 100644 index 000000000..17f142bbb --- /dev/null +++ b/blob-stream/blob-stream.d.ts @@ -0,0 +1,20 @@ +// Type definitions for Pdfkit v0.7.1 +// Project: https://github.com/devongovett/blob-stream +// Definitions by: Eric Hillah +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare function BlobStream(): BlobStream.IBlobStream; + +declare module BlobStream { + + interface IBlobStream extends NodeJS.WritableStream{ + toBlob(type: string): Blob; + toBlobURL(type: string): string; + } +} + +declare module "blob-stream" { + export = BlobStream; +}