@atomist/rug
Version:
TypeScript model for Atomist Rugs, see http://docs.atomist.com/
40 lines (39 loc) • 1.64 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var DecoratingPathExpressionEngine_1 = require("../DecoratingPathExpressionEngine");
var scala = require("./Types");
/**
* PathExpressionEngine decorator that returns Scala type mixins
* from all methods.
*/
var ScalaPathExpressionEngine = (function (_super) {
__extends(ScalaPathExpressionEngine, _super);
function ScalaPathExpressionEngine() {
return _super !== null && _super.apply(this, arguments) || this;
}
ScalaPathExpressionEngine.prototype.decoratorFor = function (n) {
var className = this.decoratorClassName(n);
// Dynamically instantiate the class with the given name in the
// target module
try {
var ops = new scala[className](n, this.delegate);
return ops;
}
catch (e) {
// Not an error. We just don't have a special type for this
return null;
}
};
return ScalaPathExpressionEngine;
}(DecoratingPathExpressionEngine_1.DecoratingPathExpressionEngine));
exports.ScalaPathExpressionEngine = ScalaPathExpressionEngine;