Use a typescript index signature to get the type of tasks right