Skip to content

[api] Add .isReadonlySymbol() method - #63943

Merged
Andrew Branch (andrewbranch) merged 10 commits into
microsoft:mainfrom
mrazauskas:add-isReadonlySymbol
Aug 27, 2026
Merged

[api] Add .isReadonlySymbol() method#63943
Andrew Branch (andrewbranch) merged 10 commits into
microsoft:mainfrom
mrazauskas:add-isReadonlySymbol

Conversation

@mrazauskas

Copy link
Copy Markdown
Contributor

This PR adds the .isReadonlySymbol() method to the checker instance.

Fixes #63828
Fixes #31296

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

Copy link
Copy Markdown

The TypeScript team hasn't accepted the linked issue #63828. If you can get it accepted, this PR will have a better chance of being reviewed.

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 Checker.isReadonlySymbol() to expose compiler readonly-symbol detection through the TypeScript API.

Changes:

  • Adds the checker and protocol endpoint.
  • Implements synchronous and asynchronous client methods.
  • Adds API tests for const and let symbols.

Reviewed changes

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

Show a summary per file
File Description
tsc/internal/checker/exports.go Exposes readonly-symbol detection.
tsc/internal/api/session.go Handles the new API request.
tsc/internal/api/proto.go Registers the protocol method.
packages/typescript/src/api/proto.generated.ts Adds protocol typing.
packages/typescript/src/api/sync/api.ts Adds the synchronous API.
packages/typescript/src/api/async/api.ts Adds the asynchronous API.
packages/typescript/test/sync/api.test.ts Tests the synchronous API.
packages/typescript/test/async/api.test.ts Tests the asynchronous API.

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

Comment thread packages/typescript/test/sync/api.test.ts Outdated
Comment thread packages/typescript/test/async/api.test.ts Outdated
Comment thread packages/typescript/src/api/async/api.ts
Comment thread packages/typescript/src/api/sync/api.ts
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Signed-off-by: mrazauskas <tom@mrazauskas.de>
@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Aug 26, 2026
auto-merge was automatically disabled August 27, 2026 04:05

Head branch was pushed to by a user without write access

@andrewbranch
Andrew Branch (andrewbranch) added this pull request to the merge queue Aug 27, 2026
Merged via the queue into microsoft:main with commit 065f7ac Aug 27, 2026
25 checks passed
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Aug 27, 2026
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: Done

Development

Successfully merging this pull request may close these issues.

Add API to detect wherever a symbol is readonly API: expose isReadonlySymbol

3 participants