# program.Program.output

- **Module:** program
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/ad09eaef7ffff40f510989ee0695852c44a31576/packages/libtmux/src/program.ts#L87
- **Page:** https://libtmux.org/en/ts/latest/reference/program-program-output/

```
async output(): Promise<string>
```

What the program has printed so far, as its terminal shows it.

Scrollback is included and wrapped lines are joined. Tabs and trailing
spaces are kept; colors and cursor movement are applied rather than
returned.

## Examples

```ts
await using program = await server.spawn(["echo", "hello"]);
await program.wait();
await program.output(); // "hello"
```
