* 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
()
| 4937 | * dropped them. Read once per cache window. |
| 4938 | */ |
| 4939 | private classExpressionOnlyNames(): Set<string> { |
| 4940 | if (this.classExpressionOnlyNameSet) return this.classExpressionOnlyNameSet; |
| 4941 | const only = new Set<string>(); |
| 4942 | const expressions = this.classExpressions(); |
| 4943 | if (expressions) { |
| 4944 | const names = new Set<string>(); |
| 4945 | for (const id of expressions.hiddenIds) { |
| 4946 | const n = this.nodeById(id); |
| 4947 | if (n) names.add(n.name); |
| 4948 | } |
| 4949 | for (const name of names) { |
| 4950 | if (!this.queries.getNodesByName(name).some((n) => !expressions.hiddenIds.has(n.id))) only.add(name); |
| 4951 | } |
| 4952 | } |
| 4953 | this.classExpressionOnlyNameSet = only; |
| 4954 | return only; |
| 4955 | } |
| 4956 | |
| 4957 | /** classExpressionOnlyNames' answer; clearCaches drops it. */ |
| 4958 | private classExpressionOnlyNameSet: Set<string> | null = null; |
no test coverage detected