Skip to content

Function: dependentsOf() ​

ts
function dependentsOf<TPartition>(topology, partitionId): readonly TPartition[];

Defined in: topology/topology-queries.ts:21

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

Given db <- api <- web, dependentsOf(topology, 'db') returns ['api', 'web'] and dependentsOf(topology, 'web') returns [].

Type Parameters ​

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

Parameters ​

ParameterTypeDescription
topologyMaybeBuilder<TopologyNode<TPartition>>Compiled TopologyNode or P.topology(...) builder.
partitionIdTPartitionSource partition identifier to query.

Returns ​

readonly TPartition[]

Frozen array of strict transitive dependent partition IDs.

Throws ​

If partitionId is not a declared partition in topology.

Released under the MIT License.