---
title: "BuildRegistryOptions: interface in Tooling, TypeShade API"
description: "BuildRegistryOptions, an interface in Tooling. Options for buildRegistry."
url: https://typeshade.dev/api/buildregistryoptions/
language: en
---

# `BuildRegistryOptions`

Interface in Tooling

Options for buildRegistry.

`import type { BuildRegistryOptions } from 'typeshade'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
interface BuildRegistryOptions {
  readonly order?: readonly string[];
  readonly typeName?: string;
  readonly recordName?: string;
  readonly valueType?: string;
  readonly imports?: readonly string[];
  readonly regenerateWith?: string;
  readonly stamp?: string;
}
```

## Instance properties

**`order` optional read only `readonly string[]`**

The curated id order. When given, it must name every discovered id and no others: a new module nobody registered, or a registered id whose module was deleted, both make [`buildRegistry`](https://typeshade.dev/api/buildregistry/) throw. Omit to use discovery order.

**`typeName` optional read only `string`**

Name of the generated union type. Default `RegistryKey`.

**`recordName` optional read only `string`**

Name of the generated id → module record. Default `REGISTRY`.

**`valueType` optional read only `string`**

Type annotation for a registry value, e.g. `ShaderExample`. Default `unknown`.

**`imports` optional read only `readonly string[]`**

Extra import line(s) placed above the generated ones, where `valueType` comes from.

**`regenerateWith` optional read only `string`**

The command that regenerates this file. It is named in the generated file’s banner and in the error message when `order` and the discovered set disagree, so a reader who hits that failure knows what to run.

**`stamp` optional read only `string`**

The emit identity the registry’s shader artifacts were produced with; pass the string returned by [`emitIdentity`](https://typeshade.dev/api/emitidentity/). It is recorded in the generated file’s banner, so a committed registry says which emit configuration wrote it. When two builds produce different output from the same modules, the first line of the diff then names the difference.

## See also

- [`buildRegistry`](https://typeshade.dev/api/buildregistry/)
- [`emitIdentity`](https://typeshade.dev/api/emitidentity/)

## Source

[`src/core/registry.ts`, line 38](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/registry.ts#L38), at commit af54ddad5
