UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

20 lines 886 B
/** * SPDX-License-Identifier: Apache-2.0 */ import { container } from 'tsyringe-neo'; /** * code to patch inject bug with tsyringe: https://github.com/risen228/tsyringe-neo/issues/5 * @param parameterValue - the value that should have been injected as a parameter in the constructor * @param registryToken - the token to resolve from the container * @param callingClassName - the name of the class that is calling this function */ export function patchInject(parameterValue, registryToken, callingClassName) { if (registryToken === undefined || registryToken === null) { throw new Error(`registryToken is undefined or null, callingClassName: ${callingClassName}`); } if (parameterValue === undefined || parameterValue === null) { return container.resolve(registryToken); } return parameterValue; } //# sourceMappingURL=container_helper.js.map