BuildRegistryOptions
On this page

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 26de7be8.

Syntax

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

orderoptionalread 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 throw. Omit to use discovery order.

typeNameoptionalread only string

Name of the generated union type. Default RegistryKey.

recordNameoptionalread only string

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

valueTypeoptionalread only string

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

importsoptionalread only readonly string[]

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

regenerateWithoptionalread 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.

stampoptionalread only string

The emit identity the registry’s shader artifacts were produced with; pass the string returned by 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

Source

src/core/registry.ts, line 38, at commit 26de7be8

Edit this page Report a problem