Fix types for SWRoute.replace() method