Skip to content
1 min read · 206 words

Function: resolveCalleeName() ​

ts
function resolveCalleeName(
  bindings: ImportBindings,
  callee: Node,
): ResolvedCalleeName | null;

Defined in: src/eslint/rules/common.ts:179

Resolves a callee expression to the exported name it denotes, through the file's import bindings.

Parameters ​

ParameterType
bindingsImportBindings
calleeNode

Returns ​

ResolvedCalleeName | null

Remarks ​

Three shapes resolve: a bare identifier (createSkillManager(…) — plain or aliased depending on the specifier), a member expression off a namespace import (ns.createSkillManager(…)), and the optional-chain spellings of either (the value is the same call). A local object the file built itself (const ns = { createSkillManager }) is deliberately NOT resolved — the name does not come from an import binding — and neither is a computed or two-level member chain. Those return null.

fromAdk is true only for a real import from @nhtio/adk or a @nhtio/adk/… subpath. A bare identifier the file never imports at all resolves with imported: false, fromAdk: false — the "snippet, re-export, or global" case, which the adk rules treat conservatively as a match per their own binding policies. An import of the name from a foreign module resolves with imported: true, fromAdk: false — "provably not ours", a different answer from "unknown", and the policies keep the two apart.