UNPKG

bugcore

Version:

bugcore is a JavaScript library that provides a foundational architecture for object oriented JS

73 lines (51 loc) 2.11 kB
/* * Copyright (c) 2016 airbug Inc. http://airbug.com * * bugcore may be freely distributed under the MIT license. */ //------------------------------------------------------------------------------- // Annotations //------------------------------------------------------------------------------- //@Export('IPromise') //@Require('Interface') //------------------------------------------------------------------------------- // Context //------------------------------------------------------------------------------- require('bugpack').context("*", function(bugpack) { //------------------------------------------------------------------------------- // BugPack //------------------------------------------------------------------------------- var Interface = bugpack.require('Interface'); //------------------------------------------------------------------------------- // Declare Interface //------------------------------------------------------------------------------- /** * @interface */ var IPromise = Interface.declare({ _name: "IPromise", //------------------------------------------------------------------------------- // Interface Methods //------------------------------------------------------------------------------- /** * @param {function(...):*=} catchFunction * @return {Promise} */ 'catch': function(catchFunction) {}, /** * @param {function():*=} finallyFunction * @return {Promise} */ 'finally': function(finallyFunction) {}, /** * @param {function(...):*=} fulfilledFunction * @param {function(...):*=} rejectedFunction * @return {Promise} */ then: function(fulfilledFunction, rejectedFunction) {} }); //------------------------------------------------------------------------------- // Exports //------------------------------------------------------------------------------- bugpack.export('IPromise', IPromise); });