Interface GraphAlgorithms
interface GraphAlgorithms { collectReachableTypes( from: Type, $relations: string[], filterEdges?: (edgr: TypeEdge) => boolean, ): Set<Type>; existsEdgePath( from: Type, to: Type, $relations: string[], filterEdges?: (edgr: TypeEdge) => boolean, ): boolean; getEdgePath( from: Type, to: Type, $relations: string[], filterEdges?: (edgr: TypeEdge) => boolean, ): TypeEdge[];} Methods
collectReachableTypes
collectReachableTypes( from: Type, $relations: string[], filterEdges?: (edgr: TypeEdge) => boolean,): Set<Type> Parameters
- from: Type
- $relations: string[]
OptionalfilterEdges: (edgr: TypeEdge) => boolean
Returns Set<Type>
existsEdgePath
existsEdgePath( from: Type, to: Type, $relations: string[], filterEdges?: (edgr: TypeEdge) => boolean,): boolean Parameters
- from: Type
- to: Type
- $relations: string[]
OptionalfilterEdges: (edgr: TypeEdge) => boolean
Returns boolean
getEdgePath
Parameters
- from: Type
- to: Type
- $relations: string[]
OptionalfilterEdges: (edgr: TypeEdge) => boolean
Graph algorithms to do calculations on the type graph. All algorithms are robust regarding cycles.