( nodeItem: IPublicTypeNodeSchema, scope: IScope, config?: NodeGeneratorConfig, )
| 163 | } |
| 164 | |
| 165 | function generateSimpleNode( |
| 166 | nodeItem: IPublicTypeNodeSchema, |
| 167 | scope: IScope, |
| 168 | config?: NodeGeneratorConfig, |
| 169 | ): CodePiece[] { |
| 170 | const basicParts = generateBasicNode(nodeItem, scope, config) || []; |
| 171 | const attrParts = generateAttrs(nodeItem, scope, config) || []; |
| 172 | const childrenParts: CodePiece[] = []; |
| 173 | if (nodeItem.children && config?.self) { |
| 174 | const childrenStr = config.self(nodeItem.children, scope); |
| 175 | |
| 176 | childrenParts.push({ |
| 177 | type: PIECE_TYPE.CHILDREN, |
| 178 | value: childrenStr, |
| 179 | }); |
| 180 | } |
| 181 | |
| 182 | return [...basicParts, ...attrParts, ...childrenParts]; |
| 183 | } |
| 184 | |
| 185 | function linkPieces(pieces: CodePiece[]): string { |
| 186 | const tagsPieces = pieces.filter((p) => p.type === PIECE_TYPE.TAG); |
no test coverage detected
searching dependent graphs…