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

Function getPropTypeName

dash/extract-meta.js:305–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303 };
304
305 const getPropTypeName = propName => {
306 if (propName.includes('=>') || propName === 'Function') {
307 return 'func';
308 } else if (['boolean', 'false', 'true'].includes(propName)) {
309 return 'bool';
310 } else if (propName === '[]') {
311 return 'array';
312 } else if (
313 propName === 'Element' ||
314 propName === 'ReactNode' ||
315 propName === 'ReactElement' ||
316 propName === 'DashComponent'
317 ) {
318 return 'node';
319 }
320 return propName;
321 };
322
323 const getPropType = (propType, propObj, parentType = null) => {
324 // Types can get namespace prefixes or not.

Callers 1

getPropTypeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…