MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / classExpressionOnlyNames

Method classExpressionOnlyNames

src/resolution/index.ts:4858–4874  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

4856 * dropped them. Read once per cache window.
4857 */
4858 private classExpressionOnlyNames(): Set<string> {
4859 if (this.classExpressionOnlyNameSet) return this.classExpressionOnlyNameSet;
4860 const only = new Set<string>();
4861 const expressions = this.classExpressions();
4862 if (expressions) {
4863 const names = new Set<string>();
4864 for (const id of expressions.hiddenIds) {
4865 const n = this.nodeById(id);
4866 if (n) names.add(n.name);
4867 }
4868 for (const name of names) {
4869 if (!this.queries.getNodesByName(name).some((n) => !expressions.hiddenIds.has(n.id))) only.add(name);
4870 }
4871 }
4872 this.classExpressionOnlyNameSet = only;
4873 return only;
4874 }
4875
4876 /** classExpressionOnlyNames' answer; clearCaches drops it. */
4877 private classExpressionOnlyNameSet: Set<string> | null = null;

Callers 1

hasAnyPossibleMatchMethod · 0.95

Calls 5

classExpressionsMethod · 0.95
nodeByIdMethod · 0.95
hasMethod · 0.80
getNodesByNameMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected