Is this the correct way to convert jQuery Deferred
to a Promise
?
var p = Promise.resolve($.getJSON('api/values', null));
Are there any other ways to do this?
What are the limitations? I've read somewhere that jQuery deferred does not support exceptions, so I assume that a promise created out of a deferred would neither. Is this correct?