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

Function isDeclaredInNode

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

Source from the content-addressed store, hash-verified

74 return node
75 },
76 isDeclaredInNode(params: {
77 functionNode: TSESTree.Node
78 reference: TSESLint.Scope.Reference
79 scopeManager: TSESLint.Scope.ScopeManager
80 }) {
81 const { functionNode, reference, scopeManager } = params
82 const scope = scopeManager.acquire(functionNode)
83
84 if (scope === null) {
85 return false
86 }
87
88 return scope.set.has(reference.identifier.name)
89 },
90 getExternalRefs(params: {
91 scopeManager: TSESLint.Scope.ScopeManager
92 sourceCode: Readonly<TSESLint.SourceCode>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected