ph-utils
Version:
js 开发工具集,前后端都可以使用(commonjs和es module)
19 lines (18 loc) • 533 B
TypeScript
import type { SpawnOptions } from "node:child_process";
/**
* 执行命令
* @param command 待执行的命令
* @param args 命令参数
*/
export declare function exec(command: string, args?: string[]): Promise<{
stdout: string;
stderr: string;
}>;
export declare function exec(command: string, options?: SpawnOptions): Promise<{
stdout: string;
stderr: string;
}>;
export declare function exec(command: string, args?: string[], options?: SpawnOptions): Promise<{
stdout: string;
stderr: string;
}>;