From 1f2c92c7c88ce6619624520ec7e6b9a1f57d445b Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 8 Nov 2018 01:18:21 -0500 Subject: Reader/Writer should use Uint8Array not ArrayBufferView Because many Reader/Writer implementations (e.g. bufio) assume their able to use subarray() with byte indexes and often ask for byte values, it makes sense to simply restrict all implementations to Uint8Array. --- js/net.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/net.ts') diff --git a/js/net.ts b/js/net.ts index 6b4c5cac8..decbd5bea 100644 --- a/js/net.ts +++ b/js/net.ts @@ -74,11 +74,11 @@ class ConnImpl implements Conn { readonly localAddr: string ) {} - write(p: ArrayBufferView): Promise { + write(p: Uint8Array): Promise { return write(this.rid, p); } - read(p: ArrayBufferView): Promise { + read(p: Uint8Array): Promise { return read(this.rid, p); } -- cgit v1.2.3