Skip to content

Commit bbd700f

Browse files
committed
fix(cloud): async iterators
1 parent 9c251db commit bbd700f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

types/wx/lib.wx.cloud.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
SOFTWARE.
2121
***************************************************************************** */
2222

23+
/// <reference lib="es2018.asynciterable" />
24+
2325
/**
2426
* Common interfaces and types
2527
*/
@@ -285,10 +287,12 @@ declare namespace ICloud {
285287
data: string
286288
json?: any
287289
}
290+
288291
interface AsyncIterator<T> {
289292
next(value?: any): Promise<IteratorResult<T>>;
290293
return?(value?: any): Promise<IteratorResult<T>>;
291294
throw?(e?: any): Promise<IteratorResult<T>>;
295+
[Symbol.asyncIterator](): AsyncIterableIterator<T>;
292296
}
293297
interface ICloudAIStreamResult {
294298
textStream: AsyncIterator<string>

0 commit comments

Comments
 (0)