(tagName: string)
| 76 | const components = new Map<string, ComponentConfig>(); |
| 77 | |
| 78 | export const getComponentByTagName = (tagName: string): ComponentConfig => { |
| 79 | const config = components.get(tagName); |
| 80 | if (!config) { |
| 81 | throw `Unknown component ${tagName}`; |
| 82 | } |
| 83 | return config; |
| 84 | }; |
| 85 | |
| 86 | export function registerComponent<Props>( |
| 87 | config: ComponentConfig |