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

---
```ts
getTypeBeforeVersion(
   p, 
   t, 
   versionKey): Type | undefined
```

## Parameters

| Parameter | Type |
| :------ | :------ |
| `p` | `Program` |
| `t` | `Type` |
| `versionKey` | `ObjectType` |

## Returns

`Type` \| `undefined`

get old type if applicable.
