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

---
```ts
setExtension(
  program,
  entity,
  extensionName,
  data): void
```

## Parameters

| Parameter | Type |
| :------ | :------ |
| `program` | `Program` |
| `entity` | `Type` |
| `extensionName` | \`x-$\{string}\` |
| `data` | `unknown` |

## Returns

`void`
