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; +}