Skip to content
1 min read · 225 words

Interface: ExecaSubprocessLike ​

Defined in: src/batteries/media/engines/execa_executor.ts:31

The subprocess handle execa returns: promise-shaped AND carrying the live OS process.

Remarks ​

Kept minimal for BYO substitution in tests — a consumer may supply any function of this shape instead of execa. The default resolver returns execa's own subprocess, which is a promise with pid/kill merged in; the group-kill path reads pid and only ever calls kill, so a hand-rolled fake without them simply falls back to execa's own kill behaviour.

Properties ​

PropertyModifierTypeDescriptionDefined in
catchpublic<TResult>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null) => Promise<ExecaResultLike | TResult>The promise-style rejection surface.src/batteries/media/engines/execa_executor.ts:39
killpublic(signal?: string) => booleanSend a signal to the process. Execa's own kill honours forceKillAfterDelay.src/batteries/media/engines/execa_executor.ts:35
pid?readonlynumberThe spawned process id; undefined when the process failed to spawn.src/batteries/media/engines/execa_executor.ts:33
thenpublic<TResult1, TResult2>(onfulfilled?: | ((value: ExecaResultLike) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null) => Promise<TResult1 | TResult2>The promise-style completion surface (then/catch merged onto the subprocess).src/batteries/media/engines/execa_executor.ts:37