stryker-api
Version:
The api for the extendable JavaScript mutation testing framework Stryker
46 lines • 1.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Define a string literal.
* @param value Token literal
*/
function stringLiteral(value) {
return value;
}
var target = '$target';
var injector = '$injector';
/**
* Common tokens used for dependency injection (see typed-inject readme for more information)
*/
exports.commonTokens = Object.freeze({
/**
* @deprecated Use 'options' instead. This is just hear to support plugin migration
*/
config: stringLiteral('config'),
getLogger: stringLiteral('getLogger'),
injector: injector,
logger: stringLiteral('logger'),
options: stringLiteral('options'),
pluginResolver: stringLiteral('pluginResolver'),
produceSourceMaps: stringLiteral('produceSourceMaps'),
sandboxFileNames: stringLiteral('sandboxFileNames'),
target: target
});
/**
* Helper method to create string literal tuple type.
* @example
* ```ts
* const inject = tokens('foo', 'bar');
* const inject2: ['foo', 'bar'] = ['foo', 'bar'];
* ```
* @param tokens The tokens as args
*/
function tokens() {
var tokens = [];
for (var _i = 0; _i < arguments.length; _i++) {
tokens[_i] = arguments[_i];
}
return tokens;
}
exports.tokens = tokens;
//# sourceMappingURL=tokens.js.map