Skip to content

Commit

Permalink
Merge pull request #29 from xiachufang/zanllp-patch-1
Browse files Browse the repository at this point in the history
Update io.md
  • Loading branch information
zanllp authored Jul 18, 2022
2 parents 6ecc162 + 6f926c0 commit 7d76a99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ watch([keyword], () => iter.reset(true)) // keyword改变后,重置并重新
但不一定需要上面那种情况,如果觉得某次迭代时间过长,也可以`abort`返回之前的状态再重新`next`

<img width="438" alt="image" src="https://user-images.githubusercontent.com/25872019/178895676-2dc42a8d-7046-45f5-94c5-d1a83d75b7bf.png">

## 返回类型的约束
makeAsyncIter是针对基于游标分页的请求,为了要获取到cursor的信息,使用了对返回类型进行约束的并发,必须满足以下类型,`next,next_cursor存在一个就行,prev同样`
makeAsyncIter是针对基于游标分页的请求,为了要获取到cursor的信息,使用了对返回类型进行约束,必须满足以下类型,`next,next_cursor存在一个就行,prev同样`
```ts
export interface PageCursor {
has_next: boolean
Expand Down

0 comments on commit 7d76a99

Please sign in to comment.