dipend
Version:
This library implements a dependency injection (DI) system in JavaScript/TypeScript, making it easier to manage dependencies in modular applications.
63 lines (61 loc) • 1.82 kB
JavaScript
/*
* Copyright 2025 Saulo V. Alvarenga. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseTransform = void 0;
class BaseTransform {
_interfaces;
_tsInstance;
_typeChecker;
_tsFactory;
get interfaces() {
if (this._interfaces === undefined) {
throw new Error("Set interfaces first.");
}
return this._interfaces;
}
setInterfaces(value) {
this._interfaces = value;
}
get tsInstance() {
if (this._tsInstance === undefined) {
throw new Error("Set tsInstance first.");
}
return this._tsInstance;
}
setTsInstance(value) {
this._tsInstance = value;
}
get typeChecker() {
if (this._typeChecker === undefined) {
throw new Error("Set typeChecker first.");
}
return this._typeChecker;
}
setTypeChecker(value) {
this._typeChecker = value;
}
get tsFactory() {
if (this._tsFactory === undefined) {
throw new Error("Set tsFactory first.");
}
return this._tsFactory;
}
setTsFactory(value) {
this._tsFactory = value;
}
}
exports.BaseTransform = BaseTransform;