Deferred.hx 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* This file is generated, do not edit! Visit http://api.jquery.com/ for API documentation. */
  2. package js.jquery;
  3. @:native("$.Deferred") extern class Deferred {
  4. /**
  5. Add handlers to be called when the Deferred object is either resolved or rejected.
  6. **/
  7. public function always(alwaysCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?alwaysCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Deferred;
  8. /**
  9. Add handlers to be called when the Deferred object is resolved.
  10. **/
  11. public function done(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Deferred;
  12. /**
  13. Add handlers to be called when the Deferred object is rejected.
  14. **/
  15. public function fail(failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Deferred;
  16. /**
  17. A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
  18. **/
  19. @:selfCall
  20. public function new(?beforeStart:js.jquery.Deferred -> Void):Void;
  21. /**
  22. Call the progressCallbacks on a Deferred object with the given <code>args</code>.
  23. **/
  24. public function notify(args:Dynamic):js.jquery.Deferred;
  25. /**
  26. Call the progressCallbacks on a Deferred object with the given context and <code>args</code>.
  27. **/
  28. public function notifyWith(context:Dynamic, ?args:Array<Dynamic>):js.jquery.Deferred;
  29. /**
  30. Utility method to filter and/or chain Deferreds.
  31. **/
  32. @:overload(function(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
  33. public function pipe(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function):js.jquery.Promise;
  34. /**
  35. Add handlers to be called when the Deferred object generates progress notifications.
  36. **/
  37. public function progress(progressCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, haxe.extern.EitherType<Array<Dynamic>, Array<haxe.Constraints.Function>>>, ?progressCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, haxe.extern.EitherType<Array<Dynamic>, Array<haxe.Constraints.Function>>>):js.jquery.Deferred;
  38. /**
  39. Return a Deferred's Promise object.
  40. **/
  41. public function promise(?target:Dynamic):js.jquery.Promise;
  42. /**
  43. Reject a Deferred object and call any failCallbacks with the given <code>args</code>.
  44. **/
  45. public function reject(?args:Dynamic):js.jquery.Deferred;
  46. /**
  47. Reject a Deferred object and call any failCallbacks with the given <code>context</code> and <code>args</code>.
  48. **/
  49. public function rejectWith(context:Dynamic, ?args:Array<Dynamic>):js.jquery.Deferred;
  50. /**
  51. Resolve a Deferred object and call any doneCallbacks with the given <code>args</code>.
  52. **/
  53. public function resolve(?args:Dynamic):js.jquery.Deferred;
  54. /**
  55. Resolve a Deferred object and call any doneCallbacks with the given <code>context</code> and <code>args</code>.
  56. **/
  57. public function resolveWith(context:Dynamic, ?args:Array<Dynamic>):js.jquery.Deferred;
  58. /**
  59. Determine the current state of a Deferred object.
  60. **/
  61. public function state():String;
  62. /**
  63. Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
  64. **/
  65. public function then(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise;
  66. }