From 4f8c9369744bfa4b1223cec916cb0e5b261831dc Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Thu, 31 Oct 2019 23:57:09 +0900 Subject: Make EOF unique symbol (#3244) --- cli/js/lib.deno_runtime.d.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'cli/js/lib.deno_runtime.d.ts') diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index c0bebf461..4331319bf 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -83,8 +83,8 @@ declare namespace Deno { // @url js/io.d.ts - export const EOF: null; - export type EOF = null; + export const EOF: unique symbol; + export type EOF = typeof EOF; export enum SeekMode { SEEK_START = 0, SEEK_CURRENT = 1, @@ -2283,8 +2283,6 @@ declare namespace eventTarget { declare namespace io { // @url js/io.d.ts - export const EOF: null; - export type EOF = null; export enum SeekMode { SEEK_START = 0, SEEK_CURRENT = 1, @@ -2308,10 +2306,10 @@ declare namespace io { * * Implementations must not retain `p`. */ - read(p: Uint8Array): Promise; + read(p: Uint8Array): Promise; } export interface SyncReader { - readSync(p: Uint8Array): number | EOF; + readSync(p: Uint8Array): number | Deno.EOF; } export interface Writer { /** Writes `p.byteLength` bytes from `p` to the underlying data @@ -2387,7 +2385,7 @@ declare namespace fetchTypes { formData(): Promise; json(): Promise; text(): Promise; - read(p: Uint8Array): Promise; + read(p: Uint8Array): Promise; close(): void; cancel(): Promise; getReader(): domTypes.ReadableStreamReader; -- cgit v1.2.3