Skip to content

API: Add declaration property to IndexInfo.#4273

Open
piotrtomiak wants to merge 1 commit into
microsoft:mainfrom
JetBrains:api-index-info-declaration
Open

API: Add declaration property to IndexInfo.#4273
piotrtomiak wants to merge 1 commit into
microsoft:mainfrom
JetBrains:api-index-info-declaration

Conversation

@piotrtomiak

Copy link
Copy Markdown
Contributor

I've found out one more missing API for WebStorm integration - lack of declaration property on the IndexInfo object.

Copilot AI review requested due to automatic review settings June 11, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Exposes the AST declaration for index signatures through the Go API and surfaces it in the native-preview TypeScript clients.

Changes:

  • Added IndexInfo.Declaration() to access the index signature’s declaration node.
  • Extended IndexInfoResponse to include an optional declaration node handle and populated it in the session handler.
  • Updated native-preview sync/async TS proto + typed APIs to carry and hydrate the new declaration field.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/checker/types.go Adds a getter for the index signature declaration node.
internal/api/session.go Includes the declaration node handle in index-info results when available.
internal/api/proto.go Extends IndexInfoResponse with a declaration field.
_packages/native-preview/src/api/proto.ts Adds declaration?: string to the TS response shape.
_packages/native-preview/src/api/sync/types.ts Adds declaration?: NodeHandle to IndexInfo.
_packages/native-preview/src/api/sync/api.ts Hydrates declaration into a NodeHandle when present.
_packages/native-preview/src/api/async/types.ts Adds declaration?: NodeHandle to IndexInfo.
_packages/native-preview/src/api/async/api.ts Hydrates declaration into a NodeHandle when present.

Comment thread _packages/native-preview/src/api/sync/api.ts
Comment thread _packages/native-preview/src/api/async/api.ts
Comment thread internal/api/proto.go
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.

2 participants