Bump semver

This commit is contained in:
Henry Mercer 2023-07-11 20:48:06 +01:00
parent 863a05b28b
commit 4b7eb74ef5
579 changed files with 13988 additions and 29840 deletions

View file

@ -27,30 +27,29 @@ function createContextKey(description) {
return Symbol.for(description);
}
exports.createContextKey = createContextKey;
var BaseContext = /** @class */ (function () {
class BaseContext {
/**
* Construct a new context which inherits values from an optional parent context.
*
* @param parentContext a context from which to inherit values
*/
function BaseContext(parentContext) {
constructor(parentContext) {
// for minification
var self = this;
const self = this;
self._currentContext = parentContext ? new Map(parentContext) : new Map();
self.getValue = function (key) { return self._currentContext.get(key); };
self.setValue = function (key, value) {
var context = new BaseContext(self._currentContext);
self.getValue = (key) => self._currentContext.get(key);
self.setValue = (key, value) => {
const context = new BaseContext(self._currentContext);
context._currentContext.set(key, value);
return context;
};
self.deleteValue = function (key) {
var context = new BaseContext(self._currentContext);
self.deleteValue = (key) => {
const context = new BaseContext(self._currentContext);
context._currentContext.delete(key);
return context;
};
}
return BaseContext;
}());
}
/** The root context is used as the default parent context when there is no active context */
exports.ROOT_CONTEXT = new BaseContext();
//# sourceMappingURL=context.js.map