diff --git a/index.d.ts b/index.d.ts index fa90177..39af31b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -10,8 +10,8 @@ declare namespace intoStream { | Iterable; type InputObject = - | {[key: string]: any} - | Iterable<{[key: string]: any}>; + | object + | Iterable; } declare const intoStream: { diff --git a/index.test-d.ts b/index.test-d.ts index d60efe9..482a255 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -25,10 +25,13 @@ intoStream(Promise.resolve(new Uint8Array(Buffer.from('unicorn').buffer))).pipe( const object = {foo: true}; const objectArray = new Set([object, {bar: true}]); const objectIterable = new Set(objectArray); +const arrayOfArrays = [[object]]; intoStream.object(object).pipe(process.stdout); intoStream.object(objectArray).pipe(process.stdout); intoStream.object(objectIterable).pipe(process.stdout); +intoStream.object(arrayOfArrays).pipe(process.stdout); intoStream.object(Promise.resolve(object)).pipe(process.stdout); intoStream.object(Promise.resolve(objectArray)).pipe(process.stdout); intoStream.object(Promise.resolve(objectIterable)).pipe(process.stdout); +intoStream.object(Promise.resolve(arrayOfArrays)).pipe(process.stdout);