spatial-monorepo / wayfinding/src / GridRouteTransportResult
Type Alias: GridRouteTransportResult
GridRouteTransportResult = {
cells:GridCell[];coordinates:Position2D[];found:true; } | {found:false;reason:"no-path"|"origin-outside-grid"|"destination-outside-grid"; }
Defined in: packages/wayfinding/src/grid-types.ts:170
Comlink-safe subset of GridRouteResult: omits grid.
OccupancyGrid.projector (a GridProjector) holds function closures (toMetres/toLngLat), which the structured-clone algorithm behind Comlink's postMessage transport cannot serialize — returning a raw GridRouteResult from a Comlink-exposed worker method throws at the boundary. The wayfinding worker's exposed findGridRoute returns this instead; same-thread callers (e.g. findGridRoute/findGridRouteOnLevel called in-process, tests) get the full GridRouteResult with grid.
