mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 01:32:55 +02:00
PIPE: Add pipe support for passing data into and out of terminal commands (#2395)
This commit is contained in:
committed by
GitHub
parent
4a22e16058
commit
92b8b58588
@@ -1,6 +1,7 @@
|
||||
import type { CompletedProgramName } from "@enums";
|
||||
import { ProgramFilePath, asProgramFilePath } from "../Paths/ProgramFilePath";
|
||||
import { BaseServer } from "../Server/BaseServer";
|
||||
import type { StdIO } from "../Terminal/StdIO/StdIO";
|
||||
|
||||
export interface IProgramCreate {
|
||||
level: number;
|
||||
@@ -11,14 +12,14 @@ export interface IProgramCreate {
|
||||
interface ProgramConstructorParams {
|
||||
name: CompletedProgramName;
|
||||
create: IProgramCreate | null;
|
||||
run: (args: string[], server: BaseServer) => void;
|
||||
run: (args: string[], server: BaseServer, stdIO: StdIO) => void;
|
||||
nsMethod?: string;
|
||||
}
|
||||
|
||||
export class Program {
|
||||
name: ProgramFilePath & CompletedProgramName;
|
||||
create: IProgramCreate | null;
|
||||
run: (args: string[], server: BaseServer) => void;
|
||||
run: (args: string[], server: BaseServer, stdIO: StdIO) => void;
|
||||
nsMethod?: string;
|
||||
|
||||
constructor({ name, create, run, nsMethod }: ProgramConstructorParams) {
|
||||
|
||||
Reference in New Issue
Block a user