1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 1 1 12 12 1 | ///<reference path=".d.ts"/> "use strict"; var fiber = require("fibers"); var Future = require("fibers/future"); function run(action) { Eif (fiber.current) { action(); } else { fiber(function () { action(); $injector.dispose(); Future.assertNoFutureLeftBehind(); }).run(); } } exports.run = run; |