* Returns a value indicating whether a name is unique within a container.
(name, container)
| 114508 | * Returns a value indicating whether a name is unique within a container. |
| 114509 | */ |
| 114510 | function isUniqueLocalName(name, container) { |
| 114511 | for (var node = container; ts.isNodeDescendantOf(node, container); node = node.nextContainer) { |
| 114512 | if (node.locals) { |
| 114513 | var local = node.locals.get(ts.escapeLeadingUnderscores(name)); |
| 114514 | // We conservatively include alias symbols to cover cases where they're emitted as locals |
| 114515 | if (local && local.flags & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */ | 2097152 /* SymbolFlags.Alias */)) { |
| 114516 | return false; |
| 114517 | } |
| 114518 | } |
| 114519 | } |
| 114520 | return true; |
| 114521 | } |
| 114522 | /** |
| 114523 | * Return the next available name in the pattern _a ... _z, _0, _1, ... |
| 114524 | * TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name. |
no test coverage detected