From c77239cbcb4aa781c36a714a4caf983a3e8d36e4 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 24 Jul 2017 20:06:30 +0200 Subject: [PATCH] [get-stream] fix typo and introduce more specific typings (#18314) * [get-stream] fix typo and introduce more specific typings * [get-stream] add myself to contributors list --- types/get-stream/index.d.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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;