Skip to content

Commit ef85d40

Browse files
committed
Allow specifying TReturn and TNext for AsyncIterableIterator and AsyncIterable
1 parent 19c3bcb commit ef85d40

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/es2018.asynciterable.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ interface AsyncIterator<T, TReturn = any, TNext = undefined> {
1616
throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
1717
}
1818

19-
interface AsyncIterable<T> {
20-
[Symbol.asyncIterator](): AsyncIterator<T>;
19+
interface AsyncIterable<T, TReturn = any, TNext = undefined> {
20+
[Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
2121
}
2222

23-
interface AsyncIterableIterator<T> extends AsyncIterator<T> {
24-
[Symbol.asyncIterator](): AsyncIterableIterator<T>;
25-
}
23+
interface AsyncIterableIterator<T, TReturn = any, TNext = undefined> extends AsyncIterator<T, TReturn, TNext> {
24+
[Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
25+
}

0 commit comments

Comments
 (0)