* The names that only class expressions' classes and members carry, which * name nothing where classExpressionFreeView hides those: lit's DOM shims * (`class HTMLElement`, `class Event`) would otherwise send every * `HTMLElement` and `new Event()` across the project through the whole * r
()
| 4627 | * dropped them. Read once per cache window. |
| 4628 | */ |
| 4629 | private classExpressionOnlyNames(): Set<string> { |
| 4630 | if (this.classExpressionOnlyNameSet) return this.classExpressionOnlyNameSet; |
| 4631 | const only = new Set<string>(); |
| 4632 | const expressions = this.classExpressions(); |
| 4633 | if (expressions) { |
| 4634 | const names = new Set<string>(); |
| 4635 | for (const id of expressions.hiddenIds) { |
| 4636 | const n = this.nodeById(id); |
| 4637 | if (n) names.add(n.name); |
| 4638 | } |
| 4639 | for (const name of names) { |
| 4640 | if (!this.queries.getNodesByName(name).some((n) => !expressions.hiddenIds.has(n.id))) only.add(name); |
| 4641 | } |
| 4642 | } |
| 4643 | this.classExpressionOnlyNameSet = only; |
| 4644 | return only; |
| 4645 | } |
| 4646 | |
| 4647 | /** classExpressionOnlyNames' answer; clearCaches drops it. */ |
| 4648 | private classExpressionOnlyNameSet: Set<string> | null = null; |
no test coverage detected