dhx.Form::send returns Deferred, not a Promise

dhx.Form.send returns and instance of Deferred, not a Promise, but Typescript’s types said that we can expect a Promise. Deferred is different from a Promise, for example finally method is missing (compared with ES2018.Promise). So, types should be consequent.

https://snippet.dhtmlx.com/0qvhqjxy

dhx.ajax returns a real Promise if fetch is defined, but a Deferred if not. :astonished:

This make me want to avoid dhx.Form.send :expressionless:

1 Like