Logo Xantham

GeneratorConfig Type

Per-package generator configuration, read from `xantham.json` next to the package manifest when present (decision O4 in `docs/plans/generator-architecture.md`).

Record fields

Record Field Description

Groups

Full Usage: Groups

Field type: Map<string, GroupDisposition>

Disposition per group, keyed as `xantham.json` spells them: npm name for a dependency, `typescript/lib` for the compiler lib.

Field type: Map<string, GroupDisposition>

Lib

Full Usage: Lib

Field type: string list option

The compiler's `lib` option, as `tsconfig.json` spells it (`["esnext"]`). `None` is the compiler's default, which includes the DOM. A global type library that redeclares DOM names (`@cloudflare/workers-types`) must set this to what its README prescribes: with the DOM loaded, every such name merges with the lib's declaration, is grouped as the compiler lib by its first declaration, and is not the package's to harvest.

Field type: string list option

ModuleName

Full Usage: ModuleName

Field type: string option

Overrides the F# module name otherwise derived from the package name.

Field type: string option

Namespace

Full Usage: Namespace

Field type: string option

The F# namespace a package family is written under. The entry package takes the namespace itself, and each group named under `groups` takes `.`: `FSharp.CloudEdge` names `@cloudedge/agents` as `FSharp.CloudEdge.Agents`. A dependency the configuration leaves unnamed keeps its derived module. Both sides of a `reference` configure the same namespace. The referencing run templates a name the referenced run has to produce, and `GE004` records each group named this way.

Field type: string option

RuntimePackage

Full Usage: RuntimePackage

Field type: string option

Overrides the npm package the generated `[]` attributes name. `None` derives it from the package name (`GeneratorConfig.runtimePackage`), which is right for every package that ships its own JavaScript and for the DefinitelyTyped naming convention. It is the escape hatch for the packages the convention cannot describe: a `@types/*` package whose runtime is named something else entirely, and a types-only package published outside DefinitelyTyped.

Field type: string option

Static members

Static member Description

GeneratorConfig.Default

Full Usage: GeneratorConfig.Default

Returns: GeneratorConfig

Type something to start searching.