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

---
```ts
getDiscriminator(program, entity): Discriminator | undefined
```

## Parameters

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

## Returns

[`Discriminator`](../interfaces/Discriminator.md) \| `undefined`
