( registry: ComponentRegistry, constructorMap?: Partial<Record<StandardComponentType, ComponentConstructor>>, )
| 157 | * @param constructorMap - 可选的组件构造函数映射,用于提供实际的组件实现 |
| 158 | */ |
| 159 | export function registerStandardComponents( |
| 160 | registry: ComponentRegistry, |
| 161 | constructorMap?: Partial<Record<StandardComponentType, ComponentConstructor>>, |
| 162 | ): void { |
| 163 | for (const componentType of STANDARD_COMPONENTS) { |
| 164 | const constructor = constructorMap?.[componentType] ?? createPlaceholderConstructor(componentType); |
| 165 | registry.register(componentType, constructor); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * 创建并初始化标准组件注册表 |
no test coverage detected