diff --git a/mod.ts b/mod.ts index 42f230a..721b807 100644 --- a/mod.ts +++ b/mod.ts @@ -35,7 +35,7 @@ export { FsFileWrapper, PathRef } from "./src/path.ts"; export type { ExpandGlobOptions, PathSymlinkOptions, SymlinkOptions, WalkEntry, WalkOptions } from "./src/path.ts"; export { CommandBuilder, CommandChild, CommandResult, KillSignal, KillSignalController } from "./src/command.ts"; export type { CommandContext, CommandHandler, CommandPipeReader, CommandPipeWriter } from "./src/command_handler.ts"; -export type { Closer, Reader, ShellPipeReader, ShellPipeWriterKind, WriterSync } from "./src/pipes.ts"; +export type { Closer, Reader, ShellPipeReaderKind, ShellPipeWriterKind, WriterSync } from "./src/pipes.ts"; export type { ConfirmOptions, MultiSelectOption, diff --git a/src/command.ts b/src/command.ts index 27ccf94..90db239 100644 --- a/src/command.ts +++ b/src/command.ts @@ -22,7 +22,7 @@ import { NullPipeWriter, PipedBuffer, Reader, - ShellPipeReader, + ShellPipeReaderKind, ShellPipeWriter, ShellPipeWriterKind, WriterSync, @@ -269,7 +269,7 @@ export class CommandBuilder implements PromiseLike { * For this reason, if you are setting stdin to something other than "inherit" or * "null", then it's recommended to set this each time you spawn a command. */ - stdin(reader: ShellPipeReader): CommandBuilder { + stdin(reader: ShellPipeReaderKind): CommandBuilder { return this.#newWithState((state) => { if (reader === "inherit" || reader === "null") { state.stdin = reader; diff --git a/src/pipes.ts b/src/pipes.ts index 58640d0..24da7ad 100644 --- a/src/pipes.ts +++ b/src/pipes.ts @@ -16,7 +16,7 @@ export interface Closer { close(): void; } -export type ShellPipeReader = +export type ShellPipeReaderKind = | "inherit" | "null" | Reader diff --git a/src/shell.ts b/src/shell.ts index 5f8ec95..2956a10 100644 --- a/src/shell.ts +++ b/src/shell.ts @@ -4,7 +4,7 @@ import { CommandContext, CommandHandler } from "./command_handler.ts"; import { getExecutableShebangFromPath, ShebangInfo } from "./common.ts"; import { DenoWhichRealEnvironment, fs, path, which } from "./deps.ts"; import { wasmInstance } from "./lib/mod.ts"; -import { Reader, ShellPipeReader, ShellPipeWriter, ShellPipeWriterKind, WriterSync } from "./pipes.ts"; +import { Reader, ShellPipeReaderKind, ShellPipeWriter, ShellPipeWriterKind, WriterSync } from "./pipes.ts"; import { EnvChange, ExecuteResult, getAbortedResult, resultFromCode } from "./result.ts"; export interface SequentialList { @@ -722,7 +722,7 @@ async function executeCommandArgs(commandArgs: string[], context: Context): Prom } } - function getStdioStringValue(value: ShellPipeReader | ShellPipeWriterKind) { + function getStdioStringValue(value: ShellPipeReaderKind | ShellPipeWriterKind) { if (value === "inheritPiped") { return "piped"; } else if (value === "inherit" || value === "null" || value === "piped") {