import type { AppContext } from "../api" ; import { ROUTE_TO } from "../events" ; param ctx param routeID param routeParams param attribs param body export function routeLink ( ctx , routeID , routeParams , attribs , body ) { return [ "a" , { ... attribs , onclick : ( e ) => { e . preventDefault ( ) ; ctx . bus . dispatch ( [ ROUTE_TO , [ routeID , routeParams ] ] ) ; } , } , body , ] ; }