From 7cb617585a16dc39be2a9f5d8bc0cf2846277478 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Fri, 3 Sep 2021 18:50:51 +0800 Subject: [PATCH] fix TS errors (#37) Signed-off-by: Josh-Cena --- index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 76aafc6..fa4ab14 100644 --- a/index.d.ts +++ b/index.d.ts @@ -18,13 +18,15 @@ declare module 'reading-time' { export type IOptions = Options; export type IReadTimeResults = ReadTimeResults; - export interface readingTimeStream extends Transform { + interface ReadingTimeStream extends Transform { stats: ReadTimeResults; options: Options; _transform: (chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback) => void; _flush: (callback: TransformCallback) => void; - (options: Options): ReadingTimeStream; + (options?: Options): ReadingTimeStream; } + const readingTimeStream: ReadingTimeStream; + export {readingTimeStream}; export default function readingTime(text: string, options?: Options): ReadTimeResults; }