---
title: ExecOutcome
description: How an exec ended.
---

# `ExecOutcome`

Type, in `@jr2/orchestrator/src/wire.ts`. The signature of an export, or a type that it names, names this type. The [Authoring surface](../authoring-surface.md) page lists each export. This type is not an export of `@jr2/orchestrator`, so a workflow module does not import it by name.

```ts
type ExecOutcome =
  | { outcome: "exited"; code: number; tail: string }
  | { outcome: "timeout"; tail: string }
  | { outcome: "killed"; signal: string; tail: string };
```

How an exec ended. Every one is output; none is a fault.

**Forms**: it is one of these objects.

- Form 1: `outcome`, `code`, `tail`

  - `outcome`: `"exited"`
  - `code`: `number`
  - `tail`: `string`
- Form 2: `outcome`, `tail`

  - `outcome`: `"timeout"`
  - `tail`: `string`
- Form 3: `outcome`, `signal`, `tail`

  - `outcome`: `"killed"`
  - `signal`: `string`
  - `tail`: `string`
