Skip to content

Commit c4d7ba4

Browse files
authored
fix: Turning "data" event to Uint8Array only for now (to keep compatibility with old versions) (#15)
1 parent 339a673 commit c4d7ba4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lite.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ interface PeerEvents {
9494
disconnect: () => void
9595
close: () => void
9696
error: (err: Error) => void
97-
data: (data: Uint8Array | string) => void
97+
data: (data: Uint8Array) => void
9898
end: () => void
9999
finish: () => void
100100
iceStateChange: (iceConnectionState: RTCIceConnectionState, iceGatheringState: RTCIceGatheringState) => void
@@ -420,7 +420,7 @@ class Peer extends EventEmitter<PeerEvents> {
420420
/**
421421
* Push data to the readable side. If data is null, signals end of stream.
422422
*/
423-
push (data: Uint8Array | string | null): void {
423+
push (data: Uint8Array | null): void {
424424
if (data === null) {
425425
this._readableEnded = true
426426
this.emit('end')

0 commit comments

Comments
 (0)