# collectUnusedSymbolDiagnostics (/docs/api/functions/collectUnusedSymbolDiagnostics)



```ts
function collectUnusedSymbolDiagnostics(ctx, mode?): Diagnostic[];
```

Defined in: [packages/core/src/unusedSymbols.ts:105](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/unusedSymbols.ts#L105)

Diagnose `params`, `fragments`, and `executors` that are declared but never
referenced. Returns warnings (or errors) for the caller to merge into the
compile result; returns nothing when the check is disabled.

## Parameters [#parameters]

### ctx [#ctx]

[`ParseContext`](../interfaces/ParseContext.mdx)

### mode? [#mode]

[`UnusedSymbolsMode`](../type-aliases/UnusedSymbolsMode.mdx) = `"warn"`

## Returns [#returns]

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


## Sitemap

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