-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
lib.es2015.iterable.d.ts exports the Promise interface, which is only used in lib.es2015.iterable.d.ts to help define the PromiseConstructor interface which isn't further used in lib.es2015.iterable.d.ts. Since both Promise and PromiseConstructor are declared in lib.es2015.promise.d.ts and the declaration for Promise in lib.es2015.iterable.d.ts is empty and the declaration for PromiseConstructor is incomplete and not linked to Promise, it seems like both should be removed from the lib.es2015.iterable.d.ts file.
As a result, I got a the compliler error
error TS2339: Property 'then' does not exist on type 'Promise<any>'
when I referenced Promise while importing iterable, and not promise instead of the expected
error TS2304: Cannot find name 'Promise'