Skip to content

[api] Add hasTrailingComma getter in the RemoteNodeList class - #63957

Open
Tom Mrazauskas (mrazauskas) wants to merge 4 commits into
microsoft:mainfrom
mrazauskas:add-hasTrailingComma
Open

[api] Add hasTrailingComma getter in the RemoteNodeList class#63957
Tom Mrazauskas (mrazauskas) wants to merge 4 commits into
microsoft:mainfrom
mrazauskas:add-hasTrailingComma

Conversation

@mrazauskas

Copy link
Copy Markdown
Contributor

Fixes #63861

This PR adds hasTrailingComma getter in the RemoteNodeList class.

AI Assistance Disclosure: Claude Sonnet assisted in authoring this PR. I have reviewed and understand all changes.

Signed-off-by: mrazauskas <tom@mrazauskas.de>
Copilot AI balanced review requested due to automatic review settings August 22, 2026 09:30
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 22, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 22, 2026

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

Adds RemoteNodeList.hasTrailingComma serialization and decoding support.

Changes:

  • Extends node records with trailing-comma metadata.
  • Bumps the protocol to version 8.
  • Generates a getter for remote node lists.

Reviewed changes

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

File Description
tsc/internal/api/encoder/encoder.go Encodes trailing-comma metadata.
tools/scripts/tsc/generate-encoder.ts Generates the new getter.
packages/typescript/src/api/node/protocol.ts Updates protocol layout and version.
packages/typescript/src/api/node/node.generated.ts Reads the serialized metadata.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/typescript/src/api/node/protocol.ts
Comment thread tsc/internal/api/encoder/encoder.go
Comment thread packages/typescript/src/api/node/protocol.ts
Comment thread packages/typescript/src/api/node/node.generated.ts
@mrazauskas
Tom Mrazauskas (mrazauskas) marked this pull request as draft August 22, 2026 09:35
Signed-off-by: mrazauskas <tom@mrazauskas.de>
Signed-off-by: mrazauskas <tom@mrazauskas.de>
Signed-off-by: mrazauskas <tom@mrazauskas.de>
@mrazauskas
Tom Mrazauskas (mrazauskas) marked this pull request as ready for review August 22, 2026 11:20
// | 16-20 | uint32 | Node index of parent |
// | 20-24 | | Node data |
// | 24-28 | uint32 | Node flags |
// | 28-32 | uint32 | HasTrailingComma (NodeList only; reserved/0 otherwise) |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

By the way, flags is always hard-coded to 0 for NodeList. So another solution could be to move HasTrailingComma to that slot for NodeList instead of creating a new one. (The ordinary nodes do not need HasTrailingComma.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

hasTrailingComma property is not implemented in RemoteNodeList class in the API

3 participants