( binding: Binding, module: SourceModule )
| 3229 | } |
| 3230 | |
| 3231 | private componentFunctionOfBinding( |
| 3232 | binding: Binding, |
| 3233 | module: SourceModule |
| 3234 | ): [FunctionNode, SourceModule] | undefined { |
| 3235 | const direct = this.boundFunctionOf(binding, module) |
| 3236 | if (direct) return direct |
| 3237 | if (binding.kind === "import") { |
| 3238 | const target = this.importOf(binding, module) |
| 3239 | return ( |
| 3240 | target.kind === "binding" ? |
| 3241 | this.componentFunctionOfBinding(target.binding, target.module) |
| 3242 | : target.kind === "expression" ? |
| 3243 | this.componentFunctionOfNode(target.node, target.module) |
| 3244 | : undefined |
| 3245 | ) |
| 3246 | } |
| 3247 | if ( |
| 3248 | !binding.writes.length && |
| 3249 | binding.declaration.type === "VariableDeclarator" && |
| 3250 | binding.declaration.init |
| 3251 | ) |
| 3252 | return this.componentFunctionOfNode(binding.declaration.init, module) |
| 3253 | } |
| 3254 | |
| 3255 | private componentFunctionOfNode( |
| 3256 | node: Node, |
no test coverage detected