I am having problems trying to replace the QueryTask for the 4.24 release, since tasks are no longer supported. I was able to do this for Identify and GeometryService tasks, but the query one is not working for me.
I am using the 4.23 version of the javascript api, and would like to upgrade to 4.24. The issue here is that I cannot seem to create a constructor for rest/query, and my query code all is in a separate module, not within the require block. It's a fairly complex application, and the query module itself is over 1000 lines of code, dynamic html, etc. So I've always created a constructor for the querytask, and used that in the query module. That doesn't seem to be possible now, unless I'm missing something.
I made a stripped down version of this here: https://codepen.io/jsauder/pen/ExLXLYq just showing how the constructor for the query cannot be created, and passed to javascript outside of the require block. If there is a way to do this, I would greatly appreciate if anyone could share this. Thanks in advance for any assistance you may be able to provide.