Skip to content

Commit 1c96ef5

Browse files
authored
Fix correct typing on async iterator stream readers (#1401)
1 parent 9de91fa commit 1c96ef5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/honest-wombats-joke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"livekit-client": patch
3+
---
4+
5+
Fix correct typing on async iterator stream readers

src/room/StreamReader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class ByteStreamReader extends BaseStreamReader<ByteStreamInfo> {
5959
}
6060
},
6161

62-
return(): IteratorResult<Uint8Array> {
62+
async return(): Promise<IteratorResult<Uint8Array>> {
6363
reader.releaseLock();
6464
return { done: true, value: undefined };
6565
},
@@ -150,7 +150,7 @@ export class TextStreamReader extends BaseStreamReader<TextStreamInfo> {
150150
}
151151
},
152152

153-
return(): IteratorResult<TextStreamChunk> {
153+
async return(): Promise<IteratorResult<TextStreamChunk>> {
154154
reader.releaseLock();
155155
return { done: true, value: undefined };
156156
},

0 commit comments

Comments
 (0)