Add type hints to closures