Typed latest service in typescrript