@better-typescript-lib/es2018
Advanced tools
Comparing version 2.8.0 to 2.9.0
/// <reference no-default-lib="true"/> | ||
interface AsyncGenerator<T = unknown, TReturn = unknown, TNext = unknown> | ||
extends AsyncIterator<T, TReturn, TNext> { | ||
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( | ||
@@ -13,5 +13,5 @@ value: TReturn | PromiseLike<TReturn>, | ||
// /// <reference lib="es2018.asynciterable" /> | ||
// 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>>; | ||
@@ -18,0 +18,0 @@ // throw(e: any): Promise<IteratorResult<T, TReturn>>; |
@@ -14,3 +14,3 @@ /// <reference no-default-lib="true"/> | ||
// 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?( | ||
@@ -21,5 +21,5 @@ value?: TReturn | PromiseLike<TReturn>, | ||
} | ||
// interface AsyncIterator<T, TReturn = any, TNext = undefined> { | ||
// interface AsyncIterator<T, TReturn = any, TNext = any> { | ||
// // 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>>; | ||
@@ -29,8 +29,29 @@ // throw?(e?: any): Promise<IteratorResult<T, TReturn>>; | ||
interface AsyncIterable<T> { | ||
[Symbol.asyncIterator](): AsyncIterator<T>; | ||
interface AsyncIterable<T, TReturn = unknown, TNext = undefined> { | ||
[Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>; | ||
} | ||
// interface AsyncIterable<T, TReturn = any, TNext = any> { | ||
// [Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>; | ||
// } | ||
interface AsyncIterableIterator<T> extends AsyncIterator<T> { | ||
[Symbol.asyncIterator](): AsyncIterableIterator<T>; | ||
/** | ||
* Describes a user-defined {@link AsyncIterator} that is also async iterable. | ||
*/ | ||
interface AsyncIterableIterator<T, TReturn = unknown, TNext = undefined> | ||
extends AsyncIterator<T, TReturn, TNext> { | ||
[Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>; | ||
} | ||
// /** | ||
// * Describes a user-defined {@link AsyncIterator} that is also async iterable. | ||
// */ | ||
// interface AsyncIterableIterator<T, TReturn = any, TNext = any> extends AsyncIterator<T, TReturn, TNext> { | ||
// [Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>; | ||
// } | ||
/** | ||
* Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. | ||
*/ | ||
interface AsyncIteratorObject<T, TReturn = unknown, TNext = unknown> | ||
extends AsyncIterator<T, TReturn, TNext> { | ||
[Symbol.asyncIterator](): AsyncIteratorObject<T, TReturn, TNext>; | ||
} |
{ | ||
"name": "@better-typescript-lib/es2018", | ||
"version": "2.8.0", | ||
"version": "2.9.0", | ||
"description": "Better TypeScript standard library", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20473
237