---
url: 'https://adk.nht.io/api/@nhtio/adk/types/type-aliases/MessageDeleteFn.md'
description: Removes a message from the persistence layer by ID.
---

# Type Alias: MessageDeleteFn

```ts
type MessageDeleteFn = (ctx: TurnContext, id: string) => void | Promise<void>;
```

Defined in: [lib/contracts/turn\_runner\_context.ts:199](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/contracts/turn_runner_context.ts#L199)

Removes a message from the persistence layer by ID.

## Parameters

| Parameter | Type                                          |
| --------- | --------------------------------------------- |
| `ctx`     | [`TurnContext`](../interfaces/TurnContext.md) |
| `id`      | `string`                                      |

## Returns

`void` | `Promise`<`void`>
