Skip to content

[WIP] Fix getTypeOfSymbol returning undefined for host-bound symbols - #67

Closed
johnsoncodehk with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-gettypeofsymbol-returns-undefined
Closed

[WIP] Fix getTypeOfSymbol returning undefined for host-bound symbols#67
johnsoncodehk with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-gettypeofsymbol-returns-undefined

Conversation

Copilot AI commented Aug 22, 2026

Copy link
Copy Markdown

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>getTypeOfSymbol returns undefined for host-bound symbols</issue_title>
<issue_description>makeRpcFacade short-circuits to undefined when resolveRpcSymbol cannot map a host-bound (volar virtual-doc) symbol, and the getTypeOfSymbol adapter (patches/typescript/overlay/src/compiler/tsgoChecker.ts) returns that directly and memoizes it in typeOfSymbolCache.

Stock's getTypeOfSymbol never returns undefined — Variable/Property/Function/Class/Enum symbols get a computed type, everything else falls back to errorType (typescript/src/compiler/checker.ts:12960).

Same category as the getDeclaredTypeOfSymbol fix in 5d548ad, but the fallback is not errorType here: returning errorType for a value/function symbol would be a silent wrong result. Needs a decision on the correct fallback for host-only symbols before fixing.
</issue_description>

Comments on the Issue (you are @copilot in this section)

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

Successfully merging this pull request may close these issues.

getTypeOfSymbol returns undefined for host-bound symbols

2 participants