Add type hints to fix reflection warnings.