UNPKG

typescript-dotnet-amd

Version:

A JavaScript-Friendly .NET Based TypeScript Library.

6 lines 1.42 kB
/*! * @author electricessence / https://github.com/electricessence/ * Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md */ define(["require","exports","../Types"],function(e,n,t){"use strict";function i(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];f(e,!1)}function r(e,n){try{return n(e)}finally{o(e,!1)}}function o(e,n){if(e&&typeof e==t.Type.OBJECT&&"function"==typeof e.dispose)if(n)try{e.dispose()}catch(i){return i}else e.dispose();return null}function f(e,n,t){void 0===t&&(t=0);for(var i,r=e?e.length:0;t<r;t++){var u=e[t];if(u)if(n){var s=o(u,!0);s&&(i||(i=[]),i.push(s))}else{var c=!1;try{o(u,!1),c=!0}finally{!c&&t+1<r&&f(e,!1,t+1)}if(!c)break}}return i}Object.defineProperty(n,"__esModule",{value:!0}),n.dispose=i,function(e){function n(e,n){void 0===n&&(n=!1),e&&o(e,n)}function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r.deferred(e)}function i(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return f(e,!0)}function r(e,n){return e&&e.length?f(e.slice(),n):void 0}e.single=n,e.deferred=t,e.withoutException=i,e.these=r,function(e){function n(e,n){void 0===n&&(n=0),e&&e.length&&(n>=0||(n=0),setTimeout(f,n,e.slice(),!0))}function t(e,n){return e&&e.length?f(e,n):void 0}e.deferred=n,e.noCopy=t}(r=e.these||(e.these={}))}(i=n.dispose||(n.dispose={})),n.using=r,n["default"]=i}); //# sourceMappingURL=dispose.js.map