Function: affectedBy()
ts
function affectedBy<TPartition>(topology, partitionId): readonly TPartition[];Defined in: topology/topology-queries.ts:43
Returns [partitionId, ...dependentsOf(topology, partitionId)], representing all partitions impacted by a change in partitionId.
Given db <- api <- web, affectedBy(topology, 'db') returns ['db', 'api', 'web'].
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TPartition extends string | string | Literal string union of partition identifiers in topology. |
Parameters
| Parameter | Type | Description |
|---|---|---|
topology | MaybeBuilder<TopologyNode<TPartition>> | Compiled TopologyNode or P.topology(...) builder. |
partitionId | TPartition | Source partition identifier to query. |
Returns
readonly TPartition[]
Frozen array starting with partitionId followed by its strict transitive dependents.
Throws
If partitionId is not a declared partition in topology.