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

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

Helper to emit a file.

## Parameters

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

## Returns

`Promise`< `void` \>
