index.ts:10:7 - error TS2322: Type 'IterableIterator<number | symbol>' is not assignable to type 'IterableIterator<SomeType>'.
Type 'number | symbol' is not assignable to type 'SomeType'.
Type 'symbol' is not assignable to type 'SomeType'.
10 const it: IterableIterator<SomeType> = [giveMeSomeType()][Symbol.iterator]()
TypeScript Version: 3.6.0-dev.20190713
Search Terms: symbol iterableiterator
Code
Expected behavior: local constant
itis typechecked correctlyActual behavior:
Typechecking fails with error:
Playground Link: http://www.typescriptlang.org/play/#code/MYewdgzgLgBAYiEMC8MDKBPAtgIxAGwAoBKAKCgwAcBTeRAFSttQppADM6RTyn0Qs1RjRQwwAV1zUATjAA+XYdR4B6FTA4xQ46RFoBDCBEm0oAC32xzASwgx24sMCjXwWkOPwATGNOpQdMBhqa3MZLg1ZCSlpUgcnFzcAc2sAN2oAWWo0ASEmEgAufkElGABvUhgq339AmAAWACZSAF8eUEhYUKKASSgZfRx8aj6BqBBpAB4ckqYAPlEAbRT0rJm8mhIAXUXMXAIAOlCxia2SUiA
Related Issues: couldn't find