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

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

## Parameters

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

## Returns

[`Discriminator`](Namespace.decorators.Interface.Discriminator.md) \| `undefined`
