import {NodeImplChunk} from "../../chunks/types/NodeImplChunk"; import {ChunkType} from "../../chunks/types/ChunkType"; /** * Determines whether the specified node implementation chunk implements the * node with structure for the specified target. * @param nodeImplChunk */ export function isStructureNodeImplChunk( nodeImplChunk: NodeImplChunk ): boolean { const {children = []} = nodeImplChunk; return children .reduce( (result, next) => result || next.type === ChunkType.ChildNode || next.type === ChunkType.ChildNodes || next.type === ChunkType.Connection || next.type === ChunkType.Connections || next.type === ChunkType.PortExposure || next.type === ChunkType.PortExposures, false as boolean); }