@mixtape/core
Version:
Supercharged fixture library for organizing and generating test data
28 lines • 787 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Abstract class implementing the `TypeBuilder` interface.
* This implementation gives easy access to adding type aliases.
* @abstract
*/
var Builder = /** @class */ (function () {
/**
* Create a new `Builder`
* @param type - name of the type that the builder can create
*/
function Builder(type) {
this.type = type;
this.aliases = [];
}
/**
* Register new alias for type, e.g. 'surname' and 'lastName'
* @protected
* @param alias - alias for type
*/
Builder.prototype.createAlias = function (alias) {
this.aliases.push(alias);
};
return Builder;
}());
exports.Builder = Builder;
//# sourceMappingURL=builder.js.map