# formatDiagnostics (/docs/api/functions/formatDiagnostics)



```ts
function formatDiagnostics(diagnostics, sources?): string;
```

Defined in: [packages/core/src/diagnostics.ts:56](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/diagnostics.ts#L56)

Render diagnostics as human-readable text, with a code frame when the
originating source is available in `sources` (keyed by file name).

## Parameters [#parameters]

### diagnostics [#diagnostics]

[`Diagnostic`](../interfaces/Diagnostic.mdx)\[]

### sources? [#sources]

`Record`\<`string`, `string`> = `{}`

## Returns [#returns]

`string`


## Sitemap

Browse the full documentation: [Markdown sitemap](https://austenstone.github.io/actio/sitemap.md) · [XML sitemap](https://austenstone.github.io/actio/sitemap.xml)