@wroud/di-tools-codemod
Version:
@wroud/di-tools-codemod is a codemod utility that automates the migration of your codebase from Inversify to @wroud/di. It streamlines the transformation process, allowing for effortless and customizable transitions through configuration support.
10 lines • 461 B
JavaScript
import { Decorator } from "jscodeshift";
export function isConstructorInjectDecorator(packages, decorator) {
if (decorator.expression.type !== "CallExpression" ||
decorator.expression.callee.type !== "Identifier") {
return false;
}
const name = decorator.expression.callee.name;
return packages.some((p) => p.injectDecorator === name || p.multiInjectDecorator === name);
}
//# sourceMappingURL=isConstructorInjectDecorator.js.map