MCPcopy Index your code
hub / github.com/plotly/dash / getPropsForFunctionalComponent

Function getPropsForFunctionalComponent

dash/extract-meta.js:476–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474 };
475
476 const getPropsForFunctionalComponent = type => {
477 const callSignatures = type.getCallSignatures();
478
479 for (const sig of callSignatures) {
480 const params = sig.getParameters();
481 if (params.length === 0) {
482 continue;
483 }
484
485 // There is only one parameter for functional components: props
486 const p = params[0];
487 if (p.name === 'props' || params.length === 1) {
488 return p;
489 }
490 }
491 return null;
492 };
493
494 const getPropsForClassComponent = (typeSymbol, source, defaultProps) => {
495 const childs = source.getChildAt(0);

Callers 1

gatherComponentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…