(propDef)
| 68391 | return propTypes; |
| 68392 | } |
| 68393 | function parsePropType(propDef) { |
| 68394 | var type = getTypeOf(propDef); |
| 68395 | if (type === "object") { |
| 68396 | if (!propDef) return { |
| 68397 | type: "object", |
| 68398 | value: null |
| 68399 | }; |
| 68400 | if ("type" in propDef) return Object.assign({}, propDef, TYPE_DEFINITIONS[propDef.type]); |
| 68401 | if (!("value" in propDef)) return { |
| 68402 | type: "object", |
| 68403 | value: propDef |
| 68404 | }; |
| 68405 | type = getTypeOf(propDef.value); |
| 68406 | return Object.assign({ |
| 68407 | type: type |
| 68408 | }, propDef, TYPE_DEFINITIONS[type]); |
| 68409 | } |
| 68410 | return Object.assign({ |
| 68411 | type: type, |
| 68412 | value: propDef |
| 68413 | }, TYPE_DEFINITIONS[type]); |
| 68414 | } |
| 68415 | function getTypeOf(value) { |
| 68416 | if (Array.isArray(value) || ArrayBuffer.isView(value)) return "array"; |
| 68417 | return (0, _typeofDefault.default)(value); |
no test coverage detected