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

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

## Parameters

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

## Returns

[`LocationContext`](Type.LocationContext.md)
