mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
466 B
TypeScript
16 lines
466 B
TypeScript
import streamToString = require("stream-to-string");
|
|
|
|
const stream = (null as any) as NodeJS.ReadableStream;
|
|
let convertedString: Promise<string>;
|
|
|
|
convertedString = streamToString(stream);
|
|
convertedString = streamToString(stream, "hex");
|
|
streamToString(stream, (err, msg) => {
|
|
const e: Error | undefined = err;
|
|
const str: string = msg;
|
|
});
|
|
streamToString(stream, "hex", (err, msg) => {
|
|
const e: Error | undefined = err;
|
|
const str: string = msg;
|
|
});
|