docs: function checkExpression(node, contextualMapper) {
              var type;
              if (node.kind === 139 /* QualifiedName */) {
                  type = checkQualifiedName(node);
              }
              else {
                  var uninstantiatedType = checkExpressionWorker(node, contextualMapper);
                  type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
              }
              if (isConstEnumObjectType(type)) {
                  // enum object type for const enums are only permitted in:
                  // - 'left' in property access
                  // - 'object' in indexed access
                  // - target in rhs of import statement
                  var ok = (node.parent.kind === 172 /* PropertyAccessExpression */ && node.parent.expression === node) ||
                      (node.parent.kind === 173 /* ElementAccessExpression */ && node.parent.expression === node) ||
                      ((node.kind === 69 /* Identifier */ || node.kind === 139 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node));
                  if (!ok) {
                      error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);
                  }
              }
              return type;
          }