interface · Browser and Node

# ExplainOptions

`@toip-tools/mandates` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mandates/src/explain.ts#L4)

Import:

```ts
import { type ExplainOptions } from "@toip-tools/mandates";
```

## Declaration

interface:

```ts
interface ExplainOptions {
  /** A person's or an agent's name for a DID. Default: the DID. */
  name?: (did: string) => string;
  /** How to show a value of an attribute, e.g. units of USDC. Default: as is. */
  units?: (u: Units, attr: string) => string;
  /** A phrase for a dimension, e.g. spendPerTx → "per payment". Default: the dimension's name. */
  label?: (dimension: string) => string | undefined;
  /** What is being decided, e.g. "this payment". Default: "this action". */
  noun?: string;
}
```

## Properties

**`name` (optional)**

`((did: string) => string) | undefined`

A person's or an agent's name for a DID. Default: the DID.

**`units` (optional)**

`((u: Units, attr: string) => string) | undefined`

How to show a value of an attribute, e.g. units of USDC. Default: as is.

**`label` (optional)**

`((dimension: string) => string | undefined) | undefined`

A phrase for a dimension, e.g. spendPerTx → "per payment". Default: the dimension's name.

**`noun` (optional)**

`string | undefined`

What is being decided, e.g. "this payment". Default: "this action".

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

---

This is the Markdown version of https://toip.tools/toolkit/mandates/api/ExplainOptions/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
