# impactedEntities

**Kind:** Function

**Source:** [`atloria-monorepo/libs/parser-core/src/techdocs/staleness.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/techdocs/staleness.ts#L82)

Given the files that changed in a push, return the set of entity ids that must be
regenerated: the entities DEFINED in those files, expanded to their dependents (things that
reference them) up to `hops` levels via the relationship graph. This is the SCIP-style
incremental fan-out — regenerate the transitive closure, not the whole repo.

## Signature

```ts
function impactedEntities(changedFiles: string[], entities: Entity[], relationships: Relationship[], opts: { hops?: number }): Set<string>
```

## Parameters

| Name | Type |
|---|---|
| `changedFiles` | `string[]` |
| `entities` | `Entity[]` |
| `relationships` | `Relationship[]` |
| `opts` | `{ hops?: number }` |

**Returns:** `Set<string>`
