the code to be evaluated
Optional
dependencies: Record<string, string>Optional
arg: unknownthe argument to be passed to the function if callTarget
is a function. Ignored if callTarget
is not a function.
Optional
callTarget: stringthe name of the export to be called (if it is a function) or returned directly (it if is a value). If the export is a Promise (or a function returning a Promise), it will be awaited until the value is resolved and returned. Defaults to initminal
.
Optional
timeout: numberhow long the code is allow to run before it is terminated. Defaults to 3 seconds
similar to run
, but throws an error if the execution
fails
Optional
dependencies: Record<string, string>Optional
arg: unknownOptional
callTarget: stringOptional
timeout: numberterminate the underlying worker
Generated using TypeDoc
Returns
output of code execution