type · Browser and Node

# Handler

`@toip-tools/trust-core` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/trust-core/src/tasks.ts#L39)

Import:

```ts
import { type Handler } from "@toip-tools/trust-core";
```

## Declaration

type:

```ts
type Handler<P, R> = (
  doc: TrustTaskDocument<P>,
  ctx: { sender: string },
) => Promise<R | Refusal | void> | R | Refusal | void;
```

[Usage guide](https://toip.tools/toolkit/trust-core/#usage) · [Error handling](https://toip.tools/toolkit/trust-core/#errors) · [All exports](https://toip.tools/toolkit/trust-core/api/)

---

This is the Markdown version of https://toip.tools/toolkit/trust-core/api/Handler/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
