* Copy the given symbol into symbol tables if the symbol has the given meaning * and it doesn't already existed in the symbol table * @param key a key for storing in symbol table; if undefined, use symbol.name * @param symbol the symbol to be added into symbol
(symbol, meaning)
| 86127 | * @param meaning meaning of symbol to filter by before adding to symbol table |
| 86128 | */ |
| 86129 | function copySymbol(symbol, meaning) { |
| 86130 | if (ts.getCombinedLocalAndExportSymbolFlags(symbol) & meaning) { |
| 86131 | var id = symbol.escapedName; |
| 86132 | // We will copy all symbol regardless of its reserved name because |
| 86133 | // symbolsToArray will check whether the key is a reserved name and |
| 86134 | // it will not copy symbol with reserved name to the array |
| 86135 | if (!symbols.has(id)) { |
| 86136 | symbols.set(id, symbol); |
| 86137 | } |
| 86138 | } |
| 86139 | } |
| 86140 | function copySymbols(source, meaning) { |
| 86141 | if (meaning) { |
| 86142 | source.forEach(function (symbol) { |
no test coverage detected