MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / generateBasicNode

Function generateBasicNode

modules/code-generator/src/utils/nodeToJSX.ts:149–163  ·  view source on GitHub ↗
(
  nodeItem: IPublicTypeNodeSchema,
  scope: IScope,
  config?: NodeGeneratorConfig,
)

Source from the content-addressed store, hash-verified

147}
148
149function generateBasicNode(
150 nodeItem: IPublicTypeNodeSchema,
151 scope: IScope,
152 config?: NodeGeneratorConfig,
153): CodePiece[] {
154 const pieces: CodePiece[] = [];
155 const tagName = (config?.tagMapping || _.identity)(nodeItem.componentName);
156
157 pieces.push({
158 value: tagName || '', // FIXME: type detection error
159 type: PIECE_TYPE.TAG,
160 });
161
162 return pieces;
163}
164
165function generateSimpleNode(
166 nodeItem: IPublicTypeNodeSchema,

Callers 1

generateSimpleNodeFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…