# CustomIdField

`interface` in `custom-id` · v0.2.1

<https://docs.seedcord.org/packages/custom-id/0.2.1/interfaces/custom-id-field>

One field in a customId shape, its wire kind plus the type it decodes to.

The chain methods build these for you. Write one by hand to name a shape in a type position, as `CustomId<'page', { index: CustomIdField<number> }>`.

```ts
interface CustomIdField<Decoded>
```

## Properties

### choices

```ts
readonly choices: readonly string[]
```

The allowed values, for a oneOf field.

### decoded

```ts
readonly decoded: Decoded
```

Phantom only, carries the decoded type and is never set at runtime.

### kind

```ts
readonly kind: 'snowflake' | 'uuid' | 'int' | 'bool' | 'oneOf' | 'someOf' | 'string'
```

Which wire encoding this field uses.

### max

```ts
readonly max: number
```

Upper bound, for a bounded int field.

### min

```ts
readonly min: number
```

Lower bound, for a bounded int field.

### nullable

```ts
readonly nullable: boolean
```

Whether this field also carries null.
