Skip to content

Commit

Permalink
fix(ts): fixed ts definitions to align with es2018
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Jan 17, 2025
1 parent 67e219e commit ac68cc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions types/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ declare function implementationOf<TParams extends unknown[]>(...interfaces: [...

declare type AsyncFunction<T = any> = (...args: any[]) => Promise<T>;

interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
interface AsyncGenerator<T = unknown, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
throw(e: any): Promise<IteratorResult<T, TReturn>>;
[Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
Expand Down
2 changes: 1 addition & 1 deletion types/util/StreamBuffer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string | Buffer>;
[Symbol.asyncIterator](): NodeJS.AsyncIterator<string | Buffer>;

write(buffer: string | Buffer, cb?: Function): boolean;
write(str: string, encoding?: string, cb?: Function): boolean;
Expand Down

0 comments on commit ac68cc6

Please sign in to comment.