Generators compiled with --target es5 --lib esnext
do not support iterator helpers
#59513
Labels
--target es5 --lib esnext
do not support iterator helpers
#59513
π Search Terms
generator iterator helper map esnext prototype
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?target=1&lib=lib.esnext.d.ts&ts=5.6.0-beta#code/PTAEAEBcEMCcHMCmkBcpEGcCsAoEEAbASwCM1MA7RAD0hxwGMB7CjSUOUAXlAG0BGADSgATMIDMwgCwBdANw44AOgBu0AgFdMACgCUSgLbQADtqLcAfKHMAqUbrmh8vMaCnCAbMIAcM+gDMNCgZIIhZQO389UABvHFBQAE8iRAIAEwi+IVEJaXkcAF8cKP0jU3MuK1t7R3xYINCDRHRYWCZYNAByKKVe0pNO6wxQCiZ2aFBA4NCWIA
π» Code
π Actual behavior
The last line above throws even when
Iterator.prototype
is present, be it from the host or a polyfill.π Expected behavior
The last line above should not throw when the global
Iterator.prototype
is present and can be used as a prototype.Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: