import { html, LitElement } from 'lit'; class TestRouter extends LitElement { static properties = { routingMap: { type: Object, attribute: false, }, path: { type: String }, }; constructor() { super(); /** @type {{ [path: string]: HTMLElement }} */ this.routingMap = {}; /** @type {string} */ this.path = ''; } render() { return html`
${Object.keys(this.routingMap).map( path => html``, )}
${this.routingMap[this.path]}
`; } } customElements.define('test-router', TestRouter);