class Steep::Locator::TypeAssertionResult

def locate_type_name(position, nesting, subtyping, type_vars)

def locate_type_name(position, nesting, subtyping, type_vars)
  if type = assertion.rbs_type(nesting, subtyping, type_vars)
    location = type.location or raise
    if location.start_pos <= position && position <= location.end_pos
      if loc = type_name_at(position, type)
        return loc
      end
    end
  end
end