in src/utils/getFlowTypeFromReactComponent.ts [125:154]
function applyExtends(documentation, path, callback, typeParams, importer) {
path.get('extends').each((extendsPath: NodePath) => {
const resolvedPath = resolveGenericTypeAnnotation(extendsPath, importer);
if (resolvedPath) {
if (resolvedPath.node.typeParameters && extendsPath.node.typeParameters) {
typeParams = getTypeParameters(
resolvedPath.get('typeParameters'),
extendsPath.get('typeParameters'),
typeParams,
importer,
);
}
applyToFlowTypeProperties(
documentation,
resolvedPath,
callback,
typeParams,
importer,
);
} else {
const id =
extendsPath.node.id ||
extendsPath.node.typeName ||
extendsPath.node.expression;
if (id && id.type === 'Identifier') {
documentation.addComposes(id.name);
}
}
});
}