如何才能在项目中使用yield*

版本是2.4.6

微信截图_20211013112201

提示 : 类型“IterableIterator”不是数组类型或字符串类型。请使用编译器选项 “–downlevelIteration” 允许迭代器进行迭代。ts(2569)

按提示加入–downlevelIteration虽然提示了,但跑不起来。
typescript.js”: Unable to retrieve source content。

求指导!!!

盲猜, yield包没导出

试试在项目 tsconfig.json 里加一句 “downlevelIteration”: true,

{
  "compilerOptions": {
    "module": "commonjs",
    "lib": [ "es2015", "es2017", "dom" ],
    "target": "es5",
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "outDir": "temp/vscode-dist",
    "forceConsistentCasingInFileNames": true,
    "downlevelIteration": true,
  },
}  
2赞

现在能用了吗 也是2.4.x