diff --git a/types/globals.d.ts b/types/globals.d.ts index 63c9be6..c894c2e 100644 --- a/types/globals.d.ts +++ b/types/globals.d.ts @@ -324,9 +324,9 @@ declare function implementationOf(...interfaces: [... declare type AsyncFunction = (...args: any[]) => Promise; -interface AsyncGenerator extends AsyncIterator { +interface AsyncGenerator extends AsyncIteratorObject { // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...args: [] | [TNext]): Promise>; + next(...[value]: [] | [TNext]): Promise>; return(value: TReturn | PromiseLike): Promise>; throw(e: any): Promise>; [Symbol.asyncIterator](): AsyncGenerator; diff --git a/types/util/StreamBuffer.d.ts b/types/util/StreamBuffer.d.ts index 79e76b3..53f425d 100644 --- a/types/util/StreamBuffer.d.ts +++ b/types/util/StreamBuffer.d.ts @@ -19,7 +19,7 @@ declare namespace __jymfony { unpipe(destination?: NodeJS.WritableStream): this; unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; wrap(oldStream: NodeJS.ReadableStream): this; - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): NodeJS.AsyncIterator; write(buffer: string | Buffer, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean;