You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// A *self-contained* demonstration of the problem follows...// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
Expected behavior:
interfaceAsyncGenerator<T=unknown,TReturn=any,TNext=unknown>extendsAsyncIterator<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<awaitedT,awaitedTReturn>>;return(value: TReturn|PromiseLike<TReturn>): Promise<IteratorResult<awaitedT,awaitedTReturn>>;throw(e: any): Promise<IteratorResult<awaitedT,awaitedTReturn>>;[Symbol.asyncIterator](): AsyncGenerator<awaitedT,awaitedTReturn,TNext>;}interfaceAsyncIterator<T,TReturn=any,TNext=undefined>{// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.next(...args: []|[TNext]): Promise<IteratorResult<awaitedT,awaitedTReturn>>;return?(value?: TReturn|PromiseLike<TReturn>): Promise<IteratorResult<awaitedT,awaitedTReturn>>;throw?(e?: any): Promise<IteratorResult<awaitedT,awaitedTReturn>>;}
Actual behavior:
interfaceAsyncGenerator<T=unknown,TReturn=any,TNext=unknown>extendsAsyncIterator<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>>;return(value: TReturn|PromiseLike<TReturn>): Promise<IteratorResult<T,TReturn>>;throw(e: any): Promise<IteratorResult<T,TReturn>>;[Symbol.asyncIterator](): AsyncGenerator<T,TReturn,TNext>;}interfaceAsyncIterator<T,TReturn=any,TNext=undefined>{// 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>>;return?(value?: TReturn|PromiseLike<TReturn>): Promise<IteratorResult<T,TReturn>>;throw?(e?: any): Promise<IteratorResult<T,TReturn>>;}
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered:
@rbuckton Can you?
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms:
Code
Expected behavior:
Actual behavior:
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: