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

---
```ts
checkFormatTypeSpec(code, prettierConfig?): Promise< boolean >
```

Check the given is correctly formatted.

## Parameters

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

## Returns

`Promise`< `boolean` \>

true if code is formatted correctly.
