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

Function collectReferences

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

Source from the content-addressed store, hash-verified

185 }
186
187 const collectReferences = (
188 currentScope: TSESLint.Scope.Scope,
189 ): Array<TSESLint.Scope.Reference> => {
190 const references = [...currentScope.references]
191
192 for (const childScope of currentScope.childScopes) {
193 references.push(...collectReferences(childScope))
194 }
195
196 return references
197 }
198
199 const references = collectReferences(scope)
200 .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