import {
Route,
RouteSegment,
RouteInstruction
} from '@magiclane/maps-sdk';
function getInstructionsFromSegments(segments: RouteSegment[]): RouteInstruction[] {
const instructionsList: RouteInstruction[] = [];
for (const segment of segments) {
const segmentInstructions = segment.instructions;
instructionsList.push(...segmentInstructions);
}
return instructionsList;
}