(binding: Binding)
| 3623 | |
| 3624 | // e.g. not `V` in `if (flag) { var V = type("string") }` |
| 3625 | const isDeclaredInBody = (binding: Binding): boolean => { |
| 3626 | let container = binding.declaration.parent?.parent |
| 3627 | if (container?.type === "ExportNamedDeclaration") container = container.parent |
| 3628 | const scope = binding.scope.node |
| 3629 | return container === scope || ("body" in scope && container === scope.body) |
| 3630 | } |
| 3631 | |
| 3632 | const parameterCount = (fn: FunctionNode): number => { |
| 3633 | let count = 0 |