(path)
| 189 | }, |
| 190 | |
| 191 | CallExpression(path) { |
| 192 | if (!FileWithImports) return |
| 193 | |
| 194 | const target = getTarget(path.node.callee, Sources, SOURCE_TYPES.effect) |
| 195 | if (!target) return |
| 196 | |
| 197 | let name: string | undefined |
| 198 | |
| 199 | let parent = path.parentPath |
| 200 | for (let i = 0; i < 5; i++) { |
| 201 | |
| 202 | if (parent.node.type === 'CallExpression' && |
| 203 | parent.node.callee.type === 'Identifier' |
| 204 | ) { |
| 205 | name = `to_${parent.node.callee.name}` |
| 206 | break |
| 207 | } |
| 208 | |
| 209 | if ((parent.node.type === 'FunctionDeclaration' || |
| 210 | parent.node.type === 'VariableDeclarator') && |
| 211 | parent.node.id?.type === 'Identifier' |
| 212 | ) { |
| 213 | name = `in_${parent.node.id.name}` |
| 214 | break |
| 215 | } |
| 216 | |
| 217 | if (parent.parentPath) { |
| 218 | parent = parent.parentPath |
| 219 | } else { |
| 220 | break |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | if (name) { |
| 225 | addNameToOptions(path.node, 2, name) |
| 226 | } |
| 227 | }, |
| 228 | }, |
| 229 | } |
| 230 |
nothing calls this directly
no test coverage detected
searching dependent graphs…