* 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
()
| 4927 | * dropped them. Read once per cache window. |
| 4928 | */ |
| 4929 | private classExpressionOnlyNames(): Set<string> { |
| 4930 | if (this.classExpressionOnlyNameSet) return this.classExpressionOnlyNameSet; |
| 4931 | const only = new Set<string>(); |
| 4932 | const expressions = this.classExpressions(); |
| 4933 | if (expressions) { |
| 4934 | const names = new Set<string>(); |
| 4935 | for (const id of expressions.hiddenIds) { |
| 4936 | const n = this.nodeById(id); |
| 4937 | if (n) names.add(n.name); |
| 4938 | } |
| 4939 | for (const name of names) { |
| 4940 | if (!this.queries.getNodesByName(name).some((n) => !expressions.hiddenIds.has(n.id))) only.add(name); |
| 4941 | } |
| 4942 | } |
| 4943 | this.classExpressionOnlyNameSet = only; |
| 4944 | return only; |
| 4945 | } |
| 4946 | |
| 4947 | /** classExpressionOnlyNames' answer; clearCaches drops it. */ |
| 4948 | private classExpressionOnlyNameSet: Set<string> | null = null; |
no test coverage detected