( binding: Binding, module: SourceModule, kindOfKey: KindOfKey )
| 4589 | } |
| 4590 | |
| 4591 | private bindingInitOf( |
| 4592 | binding: Binding, |
| 4593 | module: SourceModule, |
| 4594 | kindOfKey: KindOfKey |
| 4595 | ): Located | undefined { |
| 4596 | if (binding.writes.length || this.writesThrough(binding, module).length) |
| 4597 | return |
| 4598 | if (binding.kind === "import") |
| 4599 | return this.targetInitOf(this.importOf(binding, module), kindOfKey) |
| 4600 | const declaration = binding.declaration |
| 4601 | return ( |
| 4602 | binding.kind === "const" && |
| 4603 | declaration.type === "VariableDeclarator" && |
| 4604 | declaration.id === binding.id && |
| 4605 | declaration.init |
| 4606 | ) ? |
| 4607 | { node: declaration.init, module, kindOfKey } |
| 4608 | : undefined |
| 4609 | } |
| 4610 | |
| 4611 | private targetInitOf( |
| 4612 | target: ImportTarget, |
no test coverage detected