# CustomIdShape

`type` in `custom-id` · v0.3.2

<https://seedcord.org/docs/packages/custom-id/0.3.2/types/custom-id-shape>

The fields of a customId, keyed by name.

Use it as a constraint when your own helper takes a definition and its params together. When the
fields don't matter, use [`AnyCustomId`](/docs/packages/custom-id/0.3.2/types/any-custom-id).

## Examples

```ts
function label<Shape extends CustomIdShape>(id: CustomId<string, Shape>, params: DecodedParams<Shape>): string {
    return `${id.prefix} ${JSON.stringify(params)}`;
}
```

## Declaration

```ts
type CustomIdShape = Record<
    string,
    CustomIdField<unknown>
>;
```
