( binding: Binding, module: SourceModule )
| 6207 | } |
| 6208 | |
| 6209 | private boundFunctionOf( |
| 6210 | binding: Binding, |
| 6211 | module: SourceModule |
| 6212 | ): [FunctionNode, SourceModule] | undefined { |
| 6213 | if (binding.kind === "import") { |
| 6214 | const target = this.importOf(binding, module) |
| 6215 | if (target.kind === "binding") |
| 6216 | return this.boundFunctionOf(target.binding, target.module) |
| 6217 | // e.g. `export default () => A` |
| 6218 | const fn = |
| 6219 | target.kind === "expression" && |
| 6220 | namedFunctionOf(unwrapChain(target.node), target.module) |
| 6221 | return fn && isFunctionNode(fn) ? [fn, target.module] : undefined |
| 6222 | } |
| 6223 | const fn = functionOfBinding(binding, module) |
| 6224 | return fn && [fn, module] |
| 6225 | } |
| 6226 | |
| 6227 | // e.g. a Type, a literal holding one, or a function returning one |
| 6228 | definesArk( |
no test coverage detected