Skip to content

Interface: TopologyBuilder<TPartition> ​

Defined in: ast/topology-builder.ts:12

Fluent builder and query surface for relational partition topologies (P.topology(id)).

Compiles to a passive TopologyNode<TPartition> and exposes dependentsOf and affectedBy directly on the builder for ergonomic partition impact queries.

Extends ​

Extended by ​

Type Parameters ​

Type ParameterDefault typeDescription
TPartition extends stringstringLiteral string union of partition identifiers in the topology DAG.

Methods ​

affectedBy() ​

ts
affectedBy(partitionId): readonly TPartition[];

Defined in: ast/topology-builder.ts:39

Returns [partitionId, ...dependentsOf(partitionId)], representing all partitions affected by a contract change in partitionId.

Places partitionId first followed by all strict transitive dependents in deterministic topological order so scoped rules and cross-verifiers can inspect the full impact cone.

Parameters ​

ParameterTypeDescription
partitionIdTPartitionSource partition identifier in the topology DAG.

Returns ​

readonly TPartition[]

partitionId followed by its strict transitive dependents.


dependentsOf() ​

ts
dependentsOf(partitionId): readonly TPartition[];

Defined in: ast/topology-builder.ts:27

Returns all strict transitive dependent partitions that depend (directly or indirectly) on partitionId.

Traverses the reverse dependency edges of the topology DAG in deterministic topological order, excluding partitionId itself from the returned array.

Parameters ​

ParameterTypeDescription
partitionIdTPartitionSource partition identifier in the topology DAG.

Returns ​

readonly TPartition[]

Deterministically ordered list of strict transitive dependent partitions.


toAST() ​

ts
toAST(): TopologyNode;

Defined in: ast/ast-builder.ts:20

Compiles the current builder configuration into a deeply frozen passive AST node.

Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.

Returns ​

TopologyNode

Deeply frozen passive AST node.

Inherited from ​

AstBuilder.toAST

Properties ​

PropertyModifierTypeDescriptionDefined in
idreadonlystringUnique identifier of the relational topology.ast/topology-builder.ts:15

Released under the MIT License.