@cowwoc/requirements
Version:
A fluent API for enforcing design contracts with automatic message generation.
40 lines • 1.26 kB
JavaScript
/*
* Copyright (c) 2016 Gili Tzabari
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
/*
* Copyright (c) 2016 Gili Tzabari
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
import { assertThatValueIsNotNull } from "../internal.mjs";
/**
* ApplicationScope for the main and test codebases.
*/
class AbstractApplicationScope {
parent;
/**
* The global configuration.
*/
globalConfiguration;
/**
* Creates a new instance.
*
* @param parent - the parent scope
* @param globalConfiguration - the global configuration
* @throws TypeError if any of the arguments are `undefined` or `null`
*/
constructor(parent, globalConfiguration) {
assertThatValueIsNotNull(parent, "parent");
assertThatValueIsNotNull(globalConfiguration, "globalConfiguration");
this.parent = parent;
this.globalConfiguration = globalConfiguration;
}
getGlobalConfiguration() {
return this.globalConfiguration;
}
getTerminal() {
return this.parent.getTerminal();
}
}
export { AbstractApplicationScope };
//# sourceMappingURL=AbstractApplicationScope.mjs.map