---
jsApi: true
title: "[F] getLocationContext"

---
```ts
getLocationContext(program, type): LocationContext
```

## Parameters

| Parameter | Type |
| :------ | :------ |
| `program` | [`Program`](../interfaces/Program.md) |
| `type` | [`DiagnosticTarget`](../type-aliases/DiagnosticTarget.md) |

## Returns

[`LocationContext`](../type-aliases/LocationContext.md)
