summaryrefslogtreecommitdiff
path: root/std/io/iotest.ts
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-04-28 17:40:43 +0100
committerGitHub <noreply@github.com>2020-04-28 12:40:43 -0400
commit678313b17677e012ba9a07aeca58af1aafbf4e8c (patch)
treee48e25b165a7d6d566095442448f2e36fa09c561 /std/io/iotest.ts
parent47c2f034e95696a47770d60aec1362501e7f330d (diff)
BREAKING: Remove Deno.EOF, use null instead (#4953)
Diffstat (limited to 'std/io/iotest.ts')
-rw-r--r--std/io/iotest.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/io/iotest.ts b/std/io/iotest.ts
index e2cf315aa..a309fb5e1 100644
--- a/std/io/iotest.ts
+++ b/std/io/iotest.ts
@@ -10,7 +10,7 @@ type Reader = Deno.Reader;
export class OneByteReader implements Reader {
constructor(readonly r: Reader) {}
- read(p: Uint8Array): Promise<number | Deno.EOF> {
+ read(p: Uint8Array): Promise<number | null> {
if (p.byteLength === 0) {
return Promise.resolve(0);
}
@@ -27,7 +27,7 @@ export class OneByteReader implements Reader {
export class HalfReader implements Reader {
constructor(readonly r: Reader) {}
- read(p: Uint8Array): Promise<number | Deno.EOF> {
+ read(p: Uint8Array): Promise<number | null> {
if (!(p instanceof Uint8Array)) {
throw Error("expected Uint8Array");
}
@@ -43,7 +43,7 @@ export class TimeoutReader implements Reader {
count = 0;
constructor(readonly r: Reader) {}
- read(p: Uint8Array): Promise<number | Deno.EOF> {
+ read(p: Uint8Array): Promise<number | null> {
this.count++;
if (this.count === 2) {
throw new Deno.errors.TimedOut();