Reference return types in TypeScript service (handle generics).