MCPcopy Index your code
hub / github.com/reactjs/react-codemod / getComments

Function getComments

transforms/class.js:1046–1055  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1044 statics.map(createStaticClassProperty);
1045
1046 const getComments = classPath => {
1047 if (classPath.value.comments) {
1048 return classPath.value.comments;
1049 }
1050 const declaration = j(classPath).closest(j.VariableDeclaration);
1051 if (declaration.size()) {
1052 return declaration.get().value.comments;
1053 }
1054 return null;
1055 };
1056
1057 const findUnusedVariables = (path, varName) => j(path)
1058 .closestScope()

Callers 2

updateToClassFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected