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

---
```ts
formatTypeSpec(code, prettierConfig?): Promise<string>
```

## Parameters

| Parameter | Type |
| :------ | :------ |
| `code` | `string` |
| `prettierConfig`? | `Options` |

## Returns

`Promise`<`string`\>
