import type { Circle } from "../../geometry/circle"; import type { PointOnShape } from "../../point-on-shape/point-on-shape"; import type { CpNode } from "../cp-node"; import type { LoopStringifyable } from "./loop-stringifyable"; /** @internal */ type Omit = Pick> /** @internal */ type PartialBy = Omit & Partial> /** @internal */ type Edge = | 'prev' | 'next' | 'prevOnCircle' | 'nextOnCircle' | 'holeCloserTwin'; /** @internal */ type PointOnShapeSimplified = Omit & { readonly loopIdx: number; readonly curveIdx: number; } /** @internal */ type CpNodeSimplified = Omit & { readonly pointOnShape: PointOnShapeSimplified; } /** @internal */ type CpNodeSimplifiedEdgeless = Omit; /** @internal */ type CpNodeWithAnyEdges = PartialBy< CpNodeSimplifiedEdgeless & Record, 'holeCloserTwin' > interface CpNodeStringifyable { readonly cpNodes: CpNodeWithAnyEdges[]; readonly loops: LoopStringifyable[]; } const EDGES: Edge[] = [ 'prev', 'next', 'prevOnCircle', 'nextOnCircle', 'holeCloserTwin' ]; export { EDGES } export type { PointOnShapeSimplified, CpNodeSimplified, CpNodeSimplifiedEdgeless, CpNodeStringifyable, CpNodeWithAnyEdges, }