microfoom
API referenceFunctions

runProgram

Function: runProgram()

function runProgram<P>(
   ProgramClass, 
   rawInput, 
options): Promise<Awaited<ReturnType<P["main"]>>>;

Defined in: packages/microfoom-core/src/program.ts:1083

Run a program to completion: validate rawInput against the program's declared input schema, instantiate it, wire the configured harness(es) and any trace listener, and return main()'s result. The top-level entry point the CLI and embedders call.

Type Parameters

Type Parameter
P extends FoomtimeProgram<never, unknown>

Parameters

ParameterType
ProgramClass() => P
rawInputunknown
optionsRunProgramOptions

Returns

Promise<Awaited<ReturnType<P["main"]>>>

On this page