# applyPasses (/docs/api/functions/applyPasses)



```ts
function applyPasses(ctx, passes): void;
```

Defined in: [packages/core/src/passes/registry.ts:59](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/passes/registry.ts#L59)

Sort the given passes, then run each against `ctx`.

This is the pass-only primitive. It intentionally does not perform the final
compile-time text interpolation phase that turns `{{ ... }}` tokens into
literals; use `runPasses()` or `PassRegistry.run()` for the complete public
pipeline.

## Parameters [#parameters]

### ctx [#ctx]

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

### passes [#passes]

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

## Returns [#returns]

`void`


## Sitemap

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