BREAKING: Remove Deno.EOF, use null instead (#4953)

This commit is contained in:
Nayeem Rahman 2020-04-28 17:40:43 +01:00 committed by GitHub
parent 47c2f034e9
commit 678313b176
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 329 additions and 325 deletions

View file

@ -1,6 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
EOF,
Reader,
Writer,
Seeker,
@ -76,11 +75,11 @@ export class File
return writeSync(this.rid, p);
}
read(p: Uint8Array): Promise<number | EOF> {
read(p: Uint8Array): Promise<number | null> {
return read(this.rid, p);
}
readSync(p: Uint8Array): number | EOF {
readSync(p: Uint8Array): number | null {
return readSync(this.rid, p);
}
@ -103,11 +102,11 @@ class Stdin implements Reader, ReaderSync, Closer {
this.rid = 0;
}
read(p: Uint8Array): Promise<number | EOF> {
read(p: Uint8Array): Promise<number | null> {
return read(this.rid, p);
}
readSync(p: Uint8Array): number | EOF {
readSync(p: Uint8Array): number | null {
return readSync(this.rid, p);
}