diff options
Diffstat (limited to 'io/ioutil_test.ts')
-rw-r--r-- | io/ioutil_test.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/io/ioutil_test.ts b/io/ioutil_test.ts index 4e34f5698..97ab244c0 100644 --- a/io/ioutil_test.ts +++ b/io/ioutil_test.ts @@ -1,7 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. const { Buffer } = Deno; type Reader = Deno.Reader; -type ReadResult = Deno.ReadResult; import { test } from "../testing/mod.ts"; import { assertEquals } from "../testing/asserts.ts"; import { @@ -19,10 +18,10 @@ class BinaryReader implements Reader { constructor(private bytes: Uint8Array = new Uint8Array(0)) {} - async read(p: Uint8Array): Promise<ReadResult> { + async read(p: Uint8Array): Promise<number | Deno.EOF> { p.set(this.bytes.subarray(this.index, p.byteLength)); this.index += p.byteLength; - return { nread: p.byteLength, eof: false }; + return p.byteLength; } } |