Deferred.hx 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 rejected.
  10. **/
  11. @:native("catch")
  12. public function _catch(failFilter:haxe.Constraints.Function):js.jquery.Promise;
  13. /**
  14. Add handlers to be called when the Deferred object is resolved.
  15. **/
  16. 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;
  17. /**
  18. Add handlers to be called when the Deferred object is rejected.
  19. **/
  20. 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;
  21. /**
  22. Determine whether a Deferred object has been rejected.
  23. **/
  24. @:deprecated("Deprecated since jQuery 1.7")
  25. public function isRejected():Bool;
  26. /**
  27. Determine whether a Deferred object has been resolved.
  28. **/
  29. @:deprecated("Deprecated since jQuery 1.7")
  30. public function isResolved():Bool;
  31. /**
  32. 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.
  33. **/
  34. @:selfCall
  35. public function new(?beforeStart:js.jquery.Deferred -> Void):Void;
  36. /**
  37. Call the progressCallbacks on a Deferred object with the given <code>args</code>.
  38. **/
  39. public function notify(args:Dynamic):js.jquery.Deferred;
  40. /**
  41. Call the progressCallbacks on a Deferred object with the given context and <code>args</code>.
  42. **/
  43. public function notifyWith(context:Dynamic, ?args:Array<Dynamic>):js.jquery.Deferred;
  44. /**
  45. Utility method to filter and/or chain Deferreds.
  46. **/
  47. @:deprecated("Deprecated since jQuery 1.8")
  48. @:overload(function(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
  49. public function pipe(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function):js.jquery.Promise;
  50. /**
  51. Add handlers to be called when the Deferred object generates progress notifications.
  52. **/
  53. 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;
  54. /**
  55. Return a Deferred's Promise object.
  56. **/
  57. public function promise(?target:Dynamic):js.jquery.Promise;
  58. /**
  59. Reject a Deferred object and call any failCallbacks with the given <code>args</code>.
  60. **/
  61. public function reject(?args:Dynamic):js.jquery.Deferred;
  62. /**
  63. Reject a Deferred object and call any failCallbacks with the given <code>context</code> and <code>args</code>.
  64. **/
  65. public function rejectWith(context:Dynamic, ?args:Array<Dynamic>):js.jquery.Deferred;
  66. /**
  67. Resolve a Deferred object and call any doneCallbacks with the given <code>args</code>.
  68. **/
  69. public function resolve(?args:Dynamic):js.jquery.Deferred;
  70. /**
  71. Resolve a Deferred object and call any doneCallbacks with the given <code>context</code> and <code>args</code>.
  72. **/
  73. public function resolveWith(context:Dynamic, ?args:Array<Dynamic>):js.jquery.Deferred;
  74. /**
  75. Determine the current state of a Deferred object.
  76. **/
  77. public function state():String;
  78. /**
  79. Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
  80. **/
  81. @:overload(function(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
  82. @:overload(function(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?progressCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise { })
  83. public function then(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise;
  84. }