adding generics to tsapi definition