(spec: ComponentSpec)
| 780 | * 获取组件类型名称 |
| 781 | */ |
| 782 | export function getComponentTypeName(spec: ComponentSpec): string { |
| 783 | const keys = Object.keys(spec); |
| 784 | const firstKey = keys[0]; |
| 785 | if (!firstKey) { |
| 786 | throw new Error('Invalid ComponentSpec: no type found'); |
| 787 | } |
| 788 | return firstKey; |
| 789 | } |
| 790 | |
| 791 | /** |
| 792 | * 获取组件 Props |
no outgoing calls
no test coverage detected