# Variable: expense

```ts
const expense: object & Typed<{
  amount: {
     amount: string;
     currency: string;
  };
  date?: string;
  note?: string;
  owedBy?: readonly string[];
  paidBy: string;
  split?: readonly object[];
  title: string;
}>;
```

Defined in: [packages/core/src/schemas/library/money.ts:27](https://github.com/leifriksheim/minca/blob/main/core/src/schemas/library/money.ts#L27)

An expense someone paid for a group, and how it splits. Every version is
kept, since who changed an amount matters when settling up.

## Type Declaration

### description

```ts
readonly description: "Something one person paid for a group, to split and settle up. Your own bank records are std.transaction." = 'Something one person paid for a group, to split and settle up. Your own bank records are std.transaction.';
```

### history

```ts
readonly history: "all" = 'all';
```

### name

```ts
readonly name: "std.expense" = 'std.expense';
```

### schema

```ts
readonly schema: object;
```

#### schema.properties

```ts
readonly properties: object;
```

#### schema.properties.amount

```ts
readonly amount: object & object;
```

##### Type Declaration

###### properties

```ts
properties: object;
```

###### properties.amount

```ts
amount: object;
```

###### properties.amount.maxLength

```ts
maxLength: number = max;
```

###### properties.amount.minLength?

```ts
minLength?: number = min;
```

###### properties.amount.type

```ts
type: "string";
```

###### properties.currency

```ts
currency: object;
```

###### properties.currency.maxLength

```ts
maxLength: number = 3;
```

###### properties.currency.minLength

```ts
minLength: number = 3;
```

###### properties.currency.type

```ts
type: "string";
```

###### required

```ts
required: readonly ["amount", "currency"];
```

###### type

```ts
type: "object";
```

###### x-kind

```ts
readonly "x-kind": "money";
```

#### schema.properties.date

```ts
readonly date: object & object;
```

##### Type Declaration

###### maxLength

```ts
maxLength: number = 10;
```

###### minLength

```ts
minLength: number = 10;
```

###### type

```ts
type: "string";
```

###### x-kind

```ts
readonly "x-kind": "day";
```

#### schema.properties.note

```ts
readonly note: object;
```

#### schema.properties.note.maxLength

```ts
maxLength: number = max;
```

#### schema.properties.note.minLength?

```ts
minLength?: number = min;
```

#### schema.properties.note.type

```ts
type: "string";
```

#### schema.properties.owedBy

```ts
readonly owedBy: object;
```

#### schema.properties.owedBy.items

```ts
items: object & object;
```

##### Type Declaration

###### maxLength

```ts
maxLength: number = max;
```

###### minLength?

```ts
minLength?: number = min;
```

###### type

```ts
type: "string";
```

###### x-kind

```ts
readonly "x-kind": "did";
```

#### schema.properties.owedBy.maxItems

```ts
maxItems: number = max;
```

#### schema.properties.owedBy.type

```ts
type: "array";
```

#### schema.properties.paidBy

```ts
readonly paidBy: object & object;
```

##### Type Declaration

###### maxLength

```ts
maxLength: number = max;
```

###### minLength?

```ts
minLength?: number = min;
```

###### type

```ts
type: "string";
```

###### x-kind

```ts
readonly "x-kind": "did";
```

#### schema.properties.split

```ts
readonly split: object;
```

#### schema.properties.split.description

```ts
readonly description: "Who owes a share; equal shares when left out" = 'Who owes a share; equal shares when left out';
```

#### schema.properties.split.items

```ts
readonly items: object;
```

#### schema.properties.split.items.properties

```ts
readonly properties: object;
```

#### schema.properties.split.items.properties.did

```ts
readonly did: object & object;
```

##### Type Declaration

###### maxLength

```ts
maxLength: number = max;
```

###### minLength?

```ts
minLength?: number = min;
```

###### type

```ts
type: "string";
```

###### x-kind

```ts
readonly "x-kind": "did";
```

#### schema.properties.split.items.properties.share

```ts
readonly share: object;
```

#### schema.properties.split.items.properties.share.maxLength

```ts
maxLength: number = max;
```

#### schema.properties.split.items.properties.share.minLength?

```ts
minLength?: number = min;
```

#### schema.properties.split.items.properties.share.type

```ts
type: "string";
```

#### schema.properties.split.items.required

```ts
readonly required: readonly ["did"];
```

#### schema.properties.split.items.type

```ts
readonly type: "object" = 'object';
```

#### schema.properties.split.maxItems

```ts
readonly maxItems: 100 = 100;
```

#### schema.properties.split.type

```ts
readonly type: "array" = 'array';
```

#### schema.properties.title

```ts
readonly title: object;
```

#### schema.properties.title.maxLength

```ts
maxLength: number = max;
```

#### schema.properties.title.minLength?

```ts
minLength?: number = min;
```

#### schema.properties.title.type

```ts
type: "string";
```

#### schema.required

```ts
readonly required: readonly ["title", "amount", "paidBy"];
```

#### schema.type

```ts
readonly type: "object" = 'object';
```

### title

```ts
readonly title: "Expense" = 'Expense';
```

### topics

```ts
readonly topics: readonly ["paidBy", "owedBy"];
```
