import journey from './exampleJourney'; /** * @typedef {import("./exampleJourney.js").Connection} Connection * @typedef {import("./exampleJourney.js").Journey} Journey * @typedef {import("solid-js").JSX.Element} Element */ /** * @param {Object} properties * @param {string} properties.line * @param {string} properties.color * @returns {Element} */ function LineBadge({ line, color }) { return (
{line}
); } /** * * @param {Connection} connection */ function Connection({ line, connections, destination, color, duration, headsign, }) { return (

{headsign}

{destination}

{connections.map(Connection)}
); } /** * * @param {Object} properties * @param {Journey} properties.journey * @returns {Element} */ function Journey({ journey }) { return (
{/*

{journey.source.name}

*/} {journey.connections.map(Connection)}
); } function App() { // It is pretty cool that routes are like a tree and can be perfectly mirrored in the HTML structure return ; } export default App;