cyclicDependencies

API / publicodes / utils / cyclicDependencies

function cyclicDependencies(rawRules): [GraphCycles, string[]]

Experimental

This function is useful so as to print the dependencies at each node of the cycle. ⚠️ Indeed, the findCycles function returns the cycle found using the Tarjan method, which is not necessarily the smallest cycle. However, the smallest cycle is more readable.

Parameters

ParameterType
rawRulesPartial<Record<string, RawRule>>

Returns

[GraphCycles, string[]]

Defined in

packages/core/src/AST/graph.ts:72