Skip to content

Latest commit

 

History

History
39 lines (34 loc) · 1.3 KB

es2018.asynciterable.d.ts.md

File metadata and controls

39 lines (34 loc) · 1.3 KB

es2018.asynciterable.d.ts Diffs

Index: es2018.asynciterable.d.ts
===================================================================
--- es2018.asynciterable.d.ts
+++ es2018.asynciterable.d.ts
@@ -7,26 +7,25 @@
    * the for-await-of statement.
    */
   readonly asyncIterator: unique symbol;
 }
-
-interface AsyncIterator<T, TReturn = any, TNext = any> {
+interface AsyncIterator<T, TReturn = unknown, TNext = undefined> {
   // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
   next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
   return?(
     value?: TReturn | PromiseLike<TReturn>,
   ): Promise<IteratorResult<T, TReturn>>;
   throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
 }
 
-interface AsyncIterable<T, TReturn = any, TNext = any> {
+interface AsyncIterable<T, TReturn = unknown, TNext = undefined> {
   [Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
 }
 
 /**
  * Describes a user-defined {@link AsyncIterator} that is also async iterable.
  */
-interface AsyncIterableIterator<T, TReturn = any, TNext = any>
+interface AsyncIterableIterator<T, TReturn = unknown, TNext = undefined>
   extends AsyncIterator<T, TReturn, TNext> {
   [Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
 }