MCPcopy Create free account
hub / github.com/TanStack/query / collectReferences

Function collectReferences

packages/eslint-plugin-query/src/utils/ast-utils.ts:102–112  ·  view source on GitHub ↗
(
      currentScope: TSESLint.Scope.Scope,
    )

Source from the content-addressed store, hash-verified

100 }
101
102 const collectReferences = (
103 currentScope: TSESLint.Scope.Scope,
104 ): Array<TSESLint.Scope.Reference> => {
105 const references = [...currentScope.references]
106
107 for (const childScope of currentScope.childScopes) {
108 references.push(...collectReferences(childScope))
109 }
110
111 return references
112 }
113
114 const references = collectReferences(scope)
115 .filter((x) => x.isRead() && !scope.set.has(x.identifier.name))

Callers 1

getExternalRefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected