Add type hints to the base storage code.