圖像來源,China News Service
// console.log(spanner.next(80)); // 输出1(正确)
。关于这个话题,heLLoword翻译官方下载提供了深入分析
A better streams API is possible
A difficulty here, however, is that the TransformStreamDefaultController does not have a ready promise mechanism like Writers do; so the TransformStream implementation would need to implement a polling mechanism to periodically check when controller.desiredSize becomes positive again.