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

Function isDeclaredInNode

packages/eslint-plugin-query/src/utils/ast-utils.ts:146–159  ·  view source on GitHub ↗
(params: {
    functionNode: TSESTree.Node
    reference: TSESLint.Scope.Reference
    scopeManager: TSESLint.Scope.ScopeManager
  })

Source from the content-addressed store, hash-verified

144 return identifier
145 },
146 isDeclaredInNode(params: {
147 functionNode: TSESTree.Node
148 reference: TSESLint.Scope.Reference
149 scopeManager: TSESLint.Scope.ScopeManager
150 }) {
151 const { functionNode, reference, scopeManager } = params
152 const scope = scopeManager.acquire(functionNode)
153
154 if (scope === null) {
155 return false
156 }
157
158 return scope.set.has(reference.identifier.name)
159 },
160 getExternalRefs(params: {
161 scopeManager: TSESLint.Scope.ScopeManager
162 sourceCode: Readonly<TSESLint.SourceCode>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected