diff --git a/types/get-stream/index.d.ts b/types/get-stream/index.d.ts index 9dafe344ae..19c7c6067b 100644 --- a/types/get-stream/index.d.ts +++ b/types/get-stream/index.d.ts @@ -1,18 +1,19 @@ // Type definitions for get-stream 3.0 // Project: https://github.com/sindresorhus/get-stream#readme // Definitions by: Douglas Duteil +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -import {Stream} from 'stream'; +import { Stream } from 'stream'; interface Options { /** * Encoding of the incoming stream. * @default 'utf8' */ - encoding?: string; + encoding?: BufferEncoding | 'buffer'; /** * Maximum length of the returned string. If it exceeds this value before * the stream ends, the promise will be rejected. @@ -27,8 +28,8 @@ interface Options { * stream, indicating that there is no more data to be read. * The stream is switched to flowing mode. */ -declare function getStrem(stream: Stream, options?: Options): Promise; -declare namespace getStrem { +declare function getStream(stream: Stream, options?: Options): Promise; +declare namespace getStream { /** * Get the `stream` as an array of values. * @@ -58,4 +59,4 @@ declare namespace getStrem { function buffer(stream: Stream, options?: Options): Promise; } -export = getStrem; +export = getStream;