# AbiItem.format

Formats an [`AbiItem.AbiItem`](/api/AbiItem/types#abiitem) into a **Human Readable ABI Item**.

## Imports

:::code-group
```ts [Named]
import { AbiItem } from 'ox'
```

```ts [Entrypoint]
import * as AbiItem from 'ox/AbiItem'
```
:::

## Examples

```ts twoslash
import { AbiItem } from 'ox'

const formatted = AbiItem.format({
  type: 'function',
  name: 'approve',
  stateMutability: 'nonpayable',
  inputs: [
    {
      name: 'spender',
      type: 'address'
    },
    {
      name: 'amount',
      type: 'uint256'
    }
  ],
  outputs: [{ type: 'bool' }]
})

formatted
//    ^?
```

## Definition

```ts
function format<abiItem>(
  abiItem: abiItem | AbiItem,
): format.ReturnType<abiItem>
```

**Source:** [src/core/AbiItem.ts](https://github.com/wevm/ox/blob/main/src/core/AbiItem.ts#L805)

## Parameters

### abiItem

* **Type:** `abiItem | AbiItem`

The ABI Item to format.

## Return Type

The formatted ABI Item .

`format.ReturnType<abiItem>`
