docs: function getResolvedJsxType(node, elemType, elemClassType) {
              if (!elemType) {
                  elemType = checkExpression(node.tagName);
              }
              if (elemType.flags & 524288 /* Union */) {
                  var types = elemType.types;
                  return getUnionType(types.map(function (type) {
                      return getResolvedJsxType(node, type, elemClassType);
                  }), /*subtypeReduction*/ true);
              }
              // If the elemType is a string type, we have to return anyType to prevent an error downstream as we will try to find construct or call signature of the type
              if (elemType.flags & 2 /* String */) {
                  return anyType;
              }
              else if (elemType.flags & 32 /* StringLiteral */) {
                  // If the elemType is a stringLiteral type, we can then provide a check to make sure that the string literal type is one of the Jsx intrinsic element type
                  var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
                  if (intrinsicElementsType !== unknownType) {
                      var stringLiteralTypeName = elemType.text;
                      var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
                      if (intrinsicProp) {
                          return getTypeOfSymbol(intrinsicProp);
                      }
                      var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, 0 /* String */);
                      if (indexSignatureType) {
                          return indexSignatureType;
                      }
                      error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
                  }
                  // If we need to report an error, we already done so here. So just return any to prevent any more error downstream
                  return anyType;
              }
              // Get the element instance type (the result of newing or invoking this tag)
              var elemInstanceType = getJsxElementInstanceType(node, elemType);
              if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) {
                  // Is this is a stateless function component? See if its single signature's return type is
                  // assignable to the JSX Element Type
                  if (jsxElementType) {
                      var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */);
                      var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0];
                      var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
                      var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
                      if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) {
                          // Intersect in JSX.IntrinsicAttributes if it exists
                          var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
                          if (intrinsicAttributes !== unknownType) {
                              paramType = intersectTypes(intrinsicAttributes, paramType);
                          }
                          return paramType;
                      }
                  }
              }
              // Issue an error if this return type isn't assignable to JSX.ElementClass
              if (elemClassType) {
                  checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
              }
              if (isTypeAny(elemInstanceType)) {
                  return elemInstanceType;
              }
              var propsName = getJsxElementPropertiesName();
              if (propsName === undefined) {
                  // There is no type ElementAttributesProperty, return 'any'
                  return anyType;
              }
              else if (propsName === "") {
                  // If there is no e.g. 'props' member in ElementAttributesProperty, use the element class type instead
                  return elemInstanceType;
              }
              else {
                  var attributesType = getTypeOfPropertyOfType(elemInstanceType, propsName);
                  if (!attributesType) {
                      // There is no property named 'props' on this instance type
                      return emptyObjectType;
                  }
                  else if (isTypeAny(attributesType) || (attributesType === unknownType)) {
                      // Props is of type 'any' or unknown
                      return attributesType;
                  }
                  else if (attributesType.flags & 524288 /* Union */) {
                      // Props cannot be a union type
                      error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));
                      return anyType;
                  }
                  else {
                      // Normal case -- add in IntrinsicClassElements<T> and IntrinsicElements
                      var apparentAttributesType = attributesType;
                      var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes);
                      if (intrinsicClassAttribs !== unknownType) {
                          var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
                          if (typeParams) {
                              if (typeParams.length === 1) {
                                  apparentAttributesType = intersectTypes(createTypeReference(intrinsicClassAttribs, [elemInstanceType]), apparentAttributesType);
                              }
                          }
                          else {
                              apparentAttributesType = intersectTypes(attributesType, intrinsicClassAttribs);
                          }
                      }
                      var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes);
                      if (intrinsicAttribs !== unknownType) {
                          apparentAttributesType = intersectTypes(intrinsicAttribs, apparentAttributesType);
                      }
                      return apparentAttributesType;
                  }
              }
          }