MCPcopy Create free account
hub / github.com/astercloud/aster / getComponentTypeName

Function getComponentTypeName

ui/src/types/ui-protocol.ts:782–789  ·  view source on GitHub ↗
(spec: ComponentSpec)

Source from the content-addressed store, hash-verified

780 * 获取组件类型名称
781 */
782export 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

Callers 4

processSurfaceUpdateMethod · 0.90
buildComponentNodeMethod · 0.90
buildTemplateInstanceMethod · 0.90
getComponentPropsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected