* 判断是否是一个混合组件,即 components 是一个对象,对象值是 React 组件 * 示例: * { * Button: ReactNode, * Text: ReactNode, * }
(components: any)
| 88 | * } |
| 89 | */ |
| 90 | function isMixinComponent(components: any) { |
| 91 | if (!isObject(components)) { |
| 92 | return false; |
| 93 | } |
| 94 | |
| 95 | return Object.keys(components).some(componentName => isReactComponent(components[componentName])); |
| 96 | } |
| 97 | |
| 98 | export function buildComponents(libraryMap: LibraryMap, |
| 99 | componentsMap: { [componentName: string]: IPublicTypeNpmInfo | ComponentType<any> | IPublicTypeComponentSchema }, |
no test coverage detected
searching dependent graphs…