Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Sep 7, 2024
1 parent 14eeed0 commit 604d5c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Deferred<T> {

interface ShellPipeWriterKindWithOptions {
kind: ShellPipeWriterKind;
options?: PipeOptions;
options?: StreamPipeOptions;
}

interface CommandBuilderStateCommand {
Expand Down Expand Up @@ -348,8 +348,8 @@ export class CommandBuilder implements PromiseLike<CommandResult> {

/** Set the stdout kind. */
stdout(kind: ShellPipeWriterKind): CommandBuilder;
stdout(kind: WritableStream<Uint8Array>, options?: PipeOptions): CommandBuilder;
stdout(kind: ShellPipeWriterKind, options?: PipeOptions): CommandBuilder {
stdout(kind: WritableStream<Uint8Array>, options?: StreamPipeOptions): CommandBuilder;
stdout(kind: ShellPipeWriterKind, options?: StreamPipeOptions): CommandBuilder {
return this.#newWithState((state) => {
if (state.combinedStdoutStderr && kind !== "piped" && kind !== "inheritPiped") {
throw new Error(
Expand All @@ -369,8 +369,8 @@ export class CommandBuilder implements PromiseLike<CommandResult> {

/** Set the stderr kind. */
stderr(kind: ShellPipeWriterKind): CommandBuilder;
stderr(kind: WritableStream<Uint8Array>, options?: PipeOptions): CommandBuilder;
stderr(kind: ShellPipeWriterKind, options?: PipeOptions): CommandBuilder {
stderr(kind: WritableStream<Uint8Array>, options?: StreamPipeOptions): CommandBuilder;
stderr(kind: ShellPipeWriterKind, options?: StreamPipeOptions): CommandBuilder {
return this.#newWithState((state) => {
if (state.combinedStdoutStderr && kind !== "piped" && kind !== "inheritPiped") {
throw new Error(
Expand Down
4 changes: 2 additions & 2 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export class RequestBuilder implements PromiseLike<RequestResponse> {
}

/** Pipes the response body to the provided writable stream. */
async pipeTo(dest: WritableStream<Uint8Array>, options?: PipeOptions): Promise<void> {
async pipeTo(dest: WritableStream<Uint8Array>, options?: StreamPipeOptions): Promise<void> {
const response = await this.fetch();
return await response.pipeTo(dest, options);
}
Expand Down Expand Up @@ -582,7 +582,7 @@ export class RequestResponse {
}

/** Pipes the response body to the provided writable stream. */
pipeTo(dest: WritableStream<Uint8Array>, options?: PipeOptions): Promise<void> {
pipeTo(dest: WritableStream<Uint8Array>, options?: StreamPipeOptions): Promise<void> {
return this.#withReturnHandling(() => this.readable.pipeTo(dest, options));
}

Expand Down

0 comments on commit 604d5c7

Please sign in to comment.