| 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…