@inversifyjs/core
Version:
InversifyJs core package
20 lines • 678 B
JavaScript
import { cloneBindingCache } from './cloneBindingCache.js';
/**
* Clones a ConstantValueBinding
*/
export function cloneConstantValueBinding(binding) {
return {
cache: cloneBindingCache(binding.cache),
id: binding.id,
isSatisfiedBy: binding.isSatisfiedBy,
moduleId: binding.moduleId,
onActivation: binding.onActivation,
onDeactivation: binding.onDeactivation,
scope: binding.scope,
serviceIdentifier: binding.serviceIdentifier,
type: binding.type,
// The value is not cloned as it's a resolved value
value: binding.value,
};
}
//# sourceMappingURL=cloneConstantValueBinding.js.map