Skip to content

Cannot find symbol for node "manual" in "manual.fetch" from "app/node_modules/@anthropic-ai/sdk/_shims/index.d.ts" #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xlc opened this issue Mar 2, 2025 · 0 comments

Comments

@xlc
Copy link

xlc commented Mar 2, 2025

Bug report

Input code

import type { Anthropic } from '@anthropic-ai/sdk'

export const test = (): Anthropic | undefined => {
  return undefined
}

Expected output

don't throw error

Actual output

354 | }
355 | exports.getRootSourceFile = getRootSourceFile;
356 | function getNodeOwnSymbol(node, typeChecker) {
357 |     const nodeSymbol = typeChecker.getSymbolAtLocation(node);
358 |     if (nodeSymbol === undefined) {
359 |         throw new Error(`Cannot find symbol for node "${node.getText()}" in "${node.parent.getText()}" from "${node.getSourceFile().fileName}"`);
                    ^
error: Cannot find symbol for node "manual" in "manual.fetch" from "app/node_modules/@anthropic-ai/sdk/_shims/index.d.ts"
      at getNodeOwnSymbol (app/node_modules/dts-bundle-generator/dist/helpers/typescript.js:359:15)
      at getSymbol (app/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js:240:42)
      at <anonymous> (app/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js:209:37)
      at visitNode2 (app/node_modules/typescript/lib/typescript.js:32134:18)
      at forEachChildInQualifiedName (app/node_modules/typescript/lib/typescript.js:32172:12)
      at forEachChild (app/node_modules/typescript/lib/typescript.js:32655:35)
      at computeUsagesRecursively (app/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js:194:12)
      at <anonymous> (app/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js:198:18)
      at visitNode2 (app/node_modules/typescript/lib/typescript.js:32134:18)
      at forEachChildInTypeQuery (app/node_modules/typescript/lib/typescript.js:32246:12)

Additional context

This is the code causing issue https://github.com/anthropics/anthropic-sdk-typescript/blob/5dba177ba04a01c9d0d8c903e0b808bfe9c68961/src/_shims/index.d.ts#L15-L16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant