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

---
```ts
getSegment(program, entity): string | undefined
```

## Parameters

| Parameter | Type |
| :------ | :------ |
| `program` | `Program` |
| `entity` | `Type` |

## Returns

`string` \| `undefined`
