Skip to content

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

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

[api] Add .isReadonlySymbol() method#63943
Tom Mrazauskas (mrazauskas) wants to merge 5 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
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.

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

3 participants