MCPcopy
hub / github.com/formatjs/formatjs / handleJSXOpeningElement

Function handleJSXOpeningElement

packages/unplugin/transform.ts:491–500  ·  view source on GitHub ↗
(node: JSXOpeningElement)

Source from the content-addressed store, hash-verified

489 }
490
491 function handleJSXOpeningElement(node: JSXOpeningElement): void {
492 const name =
493 node.name?.type === 'JSXIdentifier' ? node.name.name : undefined
494 if (name && componentNames.has(name)) {
495 const result = extractJSXDescriptor(node)
496 if (result) {
497 processDescriptor(result.descriptor, result.locations, true)
498 }
499 }
500 }
501
502 const visitor = new Visitor({
503 CallExpression: handleCallExpression,

Callers

nothing calls this directly

Calls 2

extractJSXDescriptorFunction · 0.85
processDescriptorFunction · 0.85

Tested by

no test coverage detected