Files
codegraph/__tests__
Colby Mchenry 34b17f6b9d fix(ts): a local annotated as one of a type's properties has that property's type (#2640)
A local or parameter annotated as one of a type's properties, like
`editor: IChatWidget['inputEditor']`, was read as the type it indexes, so
its calls reached that type's method of the same name or a guess by the
method's name: on vscode, `visibility.isVisible(…)` through
`ISessionChatPillVisibilityService['pullRequests']` reached the service's
own `isVisible`, and `chatModel.onDidChange(…)` a folding model's.

The property's declared type now decides alone, read off the indexed type
the call's file imports, with its class the one the declaring file
imports or declares, and an array property follows the array rules. A
property whose type isn't written there (a getter's, a `typeof`, a type
parameter of the class) or a key that isn't a name still reads as the
type it indexes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 05:38:10 +00:00
..