Skip to content

getTypeOfSymbol returns undefined for host-bound symbols #64

Description

@johnsoncodehk

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.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions