def get_var_type(string: str) -> str:
  """Gets the type from an argument variable.

  Args:
    string: Input variable declaration

  Returns:
    The type of the argument variable as a string, e.g. "int x" -> "int".
  """

  var = string.strip()

  # Unnamed variable
  if var in ("void", "...") or var[-1] == "*":
    return var

  return " ".join(var.split(" ")[:-1]).strip()