(context: TransformationContext, scope: Scope, symbol: ts.Symbol)
| 136 | } |
| 137 | |
| 138 | export function hasReferencedSymbol(context: TransformationContext, scope: Scope, symbol: ts.Symbol) { |
| 139 | if (!scope.referencedSymbols) { |
| 140 | return; |
| 141 | } |
| 142 | for (const nodes of scope.referencedSymbols.values()) { |
| 143 | if (nodes.some(node => context.checker.getSymbolAtLocation(node) === symbol)) { |
| 144 | return true; |
| 145 | } |
| 146 | } |
| 147 | return false; |
| 148 | } |
| 149 | |
| 150 | export function separateHoistedStatements(context: TransformationContext, statements: lua.Statement[]): HoistingResult { |
| 151 | const scope = peekScope(context); |
no test coverage detected