code: function customTypeAnnotation(path) {
      if (path.typeAnnotation) {
        return path.typeAnnotation;
      }
  
      // We are not handling the case of literals and other base types
      // since they are already handled via getTypeAnnotation
      const { node } = path;
      const binding = path.parentPath.scope.getBinding(node.name);
  
      const types = [];
      if (binding && binding.constantViolations) {
        if (binding.identifier.typeAnnotation) {
          return binding.identifier.typeAnnotation;
        }
        if (binding.constantViolations) {
          const violations = binding.constantViolations;
          for (let violation of violations) {
            types.push(violation.getTypeAnnotation());
          }
        }
      }
  
      if (types.length > 0) {
        return t.createUnionTypeAnnotation(types);
      }
      return types;
    }
docs: custom implementation of getTypeAnnotation that fixes the type information that is lost during sequence expression transformation https://github.com/babel/minify/issues/323