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
// Some standard web interfaces or third-party libraries support Symbol.iteratorinterfaceSomeStandardInterface{method(iterable: Iterable<number>): void;// Error, no Iterable on lib.es5.d.ts}interfaceSomeThirdPartyInterface{[Symbol.iterator](): IterableIterator<number>;// Error, no Symbol, no IterableIterator}
Expected behavior: We should provide a clean way to write iterable types on ES5-compatible type definition files.
Lib references is meant to address these issues.. unfortunately there is not an easy easy way to conditionally define a declaration. it is either there or not. at least with lib references the management of these dependencies will not involve the user.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.7.0-dev.201xxxxx
Search Terms:
Code
Expected behavior: We should provide a clean way to write iterable types on ES5-compatible type definition files.
Actual behavior: No such way. Some DefinitelyTyped definitions e.g. @types/node workaround this by defining Symbol.iterator and empty Iterable* interfaces.
Related Issues:
microsoft/TypeScript-DOM-lib-generator#419
#13031
#19806
The text was updated successfully, but these errors were encountered: