# flagstaff/diff

> Every export of flagstaff/diff, with its signature and doc comment: diff, plus 1 type.

Source: https://flagstaff.interlace.tools/docs/api/diff

<!-- Generated by scripts/api-reference.ts from the built dist/*.d.ts. Do not edit; run `npx tsx scripts/api-reference.ts`. -->

```ts
import { diff } from 'flagstaff/diff';
```

## Functions

### diff

A unified diff: unchanged off a terminal, numbered and coloured on one.

```ts
function diff(): Component<DiffState>;
```

**Returns** `Component<DiffState>`

## Interfaces

### DiffState

```ts
interface DiffState {
    /** A unified diff, as `git diff` or `diff -u` prints it. */
    diff: string;
}
```
