diff --git a/tyro/_cli.py b/tyro/_cli.py index eafc6870..0338f0e1 100644 --- a/tyro/_cli.py +++ b/tyro/_cli.py @@ -123,6 +123,28 @@ def cli( ) +@overload +def get_parser( + f: Type[OutT], + *, + prog: Optional[str] = None, + description: Optional[str] = None, + default: Optional[OutT] = None, +) -> argparse.ArgumentParser: + ... + + +@overload +def get_parser( + f: Callable[..., OutT], + *, + prog: Optional[str] = None, + description: Optional[str] = None, + default: Optional[OutT] = None, +) -> argparse.ArgumentParser: + ... + + def get_parser( f: Union[Type[OutT], Callable[..., OutT]], *,