From 44979e6840041627e3e99a4114525da6d5385d59 Mon Sep 17 00:00:00 2001 From: caroltrindade Date: Thu, 11 Apr 2024 15:44:30 +0200 Subject: [PATCH] chore: adjusted types --- src/s3/formatters.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/s3/formatters.ts b/src/s3/formatters.ts index 059207c..4f3e9b6 100644 --- a/src/s3/formatters.ts +++ b/src/s3/formatters.ts @@ -1,8 +1,9 @@ import { Readable } from 'stream'; -export const streamToString = async (stream: Readable | ReadableStream | Blob) => new Promise((resolve, reject) => { - const chunks = [] - stream.on('data', chunk => chunks.push(chunk)) +export const streamToString = async (stream: Readable) => new Promise((resolve, reject) => { + const chunks: any[] = [] + + stream.on('data', (chunk: any) => chunks.push(chunk)) stream.on('error', reject) stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8'))) })