Solución
solution.tsTypeScript
def handle_command(tokens: list) -> str:
match tokens:
case []: return "no command"
case ["quit"] | ["exit"]: return "quitting"
case ["help"]: return "showing help"
case ["go", destination]: return f"going to {destination}"
case ["go", destination, *_]: return f"going to {destination} with options"
case _: return "unknown command"0respuestas