Skip to content

Commit

Permalink
fix: ReadaeblStream#cancel type
Browse files Browse the repository at this point in the history
  • Loading branch information
keroxp committed Feb 2, 2019
1 parent 39f40c2 commit 7cde134
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readable_stream_reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ReadableStreamBYOBReader } from "./readable_stream_byob_reader.ts";
export interface ReadableStreamReader<T = any> {
readonly closed: Promise<any>;

cancel(reason): Promise<any>;
cancel(reason?): Promise<void>;

read(view?: ArrayBufferView): Promise<ReadableStreamReadResult<T>>;

Expand Down Expand Up @@ -46,7 +46,7 @@ export class ReadableStreamDefaultReader<T = any>
closedPromise: Defer<undefined>;
ownerReadableStream: ReadableStream;

cancel(reason): Promise<undefined> {
cancel(reason?): Promise<void> {
if (!IsReadableStreamDefaultReader(this)) {
return Promise.reject(new TypeError());
}
Expand Down

0 comments on commit 7cde134

Please # to comment.