Skip to content

Commit

Permalink
comment out unused code from WritableStreams, and TransformStream
Browse files Browse the repository at this point in the history
  • Loading branch information
nstott committed Oct 28, 2019
1 parent 9412940 commit afc153a
Show file tree
Hide file tree
Showing 13 changed files with 1,952 additions and 1,945 deletions.
46 changes: 24 additions & 22 deletions cli/js/dom_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,19 +337,6 @@ export interface ReadableStream {
tee(): ReadableStream[];
}

export interface WritableStream<W = any> {
readonly locked: boolean;
abort(reason?: any): Promise<void>;
getWriter(): WritableStreamDefaultWriter<W>;
}

export interface PipeOptions {
preventAbort?: boolean;
preventCancel?: boolean;
preventClose?: boolean;
signal?: AbortSignal;
}

export interface UnderlyingSource<R = any> {
cancel?: ReadableStreamErrorCallback;
pull?: ReadableStreamDefaultControllerCallback<R>;
Expand All @@ -365,14 +352,6 @@ export interface UnderlyingByteSource {
type: "bytes";
}

export interface UnderlyingSink<W = any> {
abort?: WritableStreamErrorCallback;
close?: WritableStreamDefaultControllerCloseCallback;
start?: WritableStreamDefaultControllerStartCallback;
type?: undefined;
write?: WritableStreamDefaultControllerWriteCallback<W>;
}

export interface ReadableStreamReader {
cancel(reason?: any): Promise<void>;
read(): Promise<any>;
Expand Down Expand Up @@ -411,6 +390,29 @@ export interface ReadableStreamBYOBRequest {
respond(bytesWritten: number): void;
respondWithNewView(view: ArrayBufferView): void;
}
/* TODO reenable these interfaces. These are needed to enable WritableStreams in js/streams/
export interface WritableStream<W = any> {
readonly locked: boolean;
abort(reason?: any): Promise<void>;
getWriter(): WritableStreamDefaultWriter<W>;
}
TODO reenable these interfaces. These are needed to enable WritableStreams in js/streams/
export interface UnderlyingSink<W = any> {
abort?: WritableStreamErrorCallback;
close?: WritableStreamDefaultControllerCloseCallback;
start?: WritableStreamDefaultControllerStartCallback;
type?: undefined;
write?: WritableStreamDefaultControllerWriteCallback<W>;
}
export interface PipeOptions {
preventAbort?: boolean;
preventCancel?: boolean;
preventClose?: boolean;
signal?: AbortSignal;
}
export interface WritableStreamDefaultWriter<W = any> {
readonly closed: Promise<void>;
Expand Down Expand Up @@ -443,7 +445,7 @@ export interface WritableStreamDefaultControllerWriteCallback<W> {
export interface WritableStreamDefaultController {
error(error?: any): void;
}

*/
export interface QueuingStrategy<T = any> {
highWaterMark?: number;
size?: QueuingStrategySizeCallback<T>;
Expand Down
3 changes: 1 addition & 2 deletions cli/js/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export enum ErrorKind {
JSError = 50,
TypeError = 51,

/** TODO These are DomException Types, and should be moved there when it exists */
/** TODO this is a DomException type, and should be moved out of here when possible */
DataCloneError = 52,
AbortError = 53
}
Loading

0 comments on commit afc153a

Please sign in to comment.