ts-budgie
Version:
Converts TypeScript code to Budgie.
33 lines • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Retrieves and merges source-to-Budgie transforms from files.
*/
var TransformationService = /** @class */ (function () {
/**
* Initializes a new instance of the TransformationService class.
*
* @param transformers Transformations to retrieve source-to-Budgie transforms from a file.
*/
function TransformationService(transformers) {
this.transformers = transformers;
}
/**
* Retrieves transforms from a file.
*
* @param sourceFile Source file to transform.
* @param typeChecker Type checker for the file.
* @returns Transformations from the file, or a complaint for unsupported syntax.
*/
TransformationService.prototype.transform = function (settings) {
var transformations = [];
for (var _i = 0, _a = this.transformers; _i < _a.length; _i++) {
var transformer = _a[_i];
transformations.push.apply(transformations, transformer(settings));
}
return transformations;
};
return TransformationService;
}());
exports.TransformationService = TransformationService;
//# sourceMappingURL=service.js.map