Commit b4f04be
fix(node-sdk): add async iterator support to EventStream for for-await-of loops
Fixes #10
- Add Symbol.asyncIterator method to EventStream prototype
- Update TypeScript type definitions
- Enables 'for await (const event of stream)' syntax
- EventStream.next() returns Promise<NextResult> with async iterator protocol1 parent de0da37 commit b4f04be
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| 577 | + | |
| 578 | + | |
577 | 579 | | |
578 | 580 | | |
579 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
| |||
0 commit comments