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

---
```ts
emitFile(program, options): Promise<void>
```

Helper to emit a file.

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `program` | [`Program`](../interfaces/Program.md) | TypeSpec Program |
| `options` | [`EmitFileOptions`](../interfaces/EmitFileOptions.md) | File Emitter options |

## Returns

`Promise`<`void`\>
