Skip to content

[api] Checker node builder APIs - #65585

Merged
Andrew Branch (andrewbranch) merged 10 commits into
microsoft:mainfrom
andrewbranch:checker-formatting-apis
Nov 20, 2026
Merged

Andrew Branch (andrewbranch) merged 10 commits into
microsoft:mainfrom
andrewbranch:checker-formatting-apis

Conversation

@andrewbranch

Copy link
Copy Markdown
Member
  • Checker.indexInfoToIndexSignatureDeclaration
  • Checker.signatureToString
  • Checker.symbolToEntityName
  • Checker.symbolToExpression
  • Checker.symbolToParameterDeclaration
  • Checker.symbolToString
  • Checker.symbolToTypeParameterDeclarations
  • Checker.typeParameterToDeclaration
  • Checker.typePredicateToString

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

🟡 Changes recommended

The new API incorrectly returns undefined for generic type aliases because its helper checks the import-alias flag instead of the type-alias flag.

1 open issue
1 file not reviewed
  • tsc/internal/api/enum_values_generated.go: Generated file
What changed in this PR

Adds nine checker formatting APIs to the TypeScript JavaScript client, exposing existing compiler functionality for producing strings and syntax nodes.

Changes:

  • Connects the new methods through checker wrappers, request handlers, and protocol definitions.
  • Adds async, sync, and generator-based client APIs, plus SymbolFormatFlags.
  • Adds formatting tests and generator-batching parity coverage.
File Description
tsc/​internal/​checker/​types.go Adds constructors for predicates and index information.
tsc/​internal/​checker/​printer.go Exposes checker formatting wrappers.
tsc/​internal/​api/​session.go Routes requests and handles string formatting.
tsc/​internal/​api/​proto.go Defines protocol methods and parameters.
tsc/​internal/​api/​enum_values_generated.go Includes symbol-format flag values.
tsc/​internal/​api/​checker_serialization.go Validates inputs and serializes generated nodes.
tools/​scripts/​tsc/​generate-enums.ts Registers SymbolFormatFlags generation.
packages/​typescript/​test/​sync/​api.test.ts Adds synchronous formatting tests.
packages/​typescript/​test/​sync/​api-generators.test.ts Adds generator-batching parity cases.
packages/​typescript/​test/​async/​api.test.ts Adds asynchronous formatting tests.
packages/​typescript/​src/​api/​sync/​api.ts Adds generated sync and generator methods.
packages/​typescript/​src/​api/​proto.generated.ts Updates generated protocol types.
packages/​typescript/​src/​api/​async/​api.ts Adds asynchronous checker methods.
packages/​typescript/​enums/​symbolFormatFlags.js Provides runtime symbol-format flags.
packages/​typescript/​enums/​symbolFormatFlags.d.ts Declares symbol-format flag types.

Review effort: Balanced

Comment thread tsc/internal/checker/printer.go Resolved

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.

🟢 Approval recommended

No active review issues block the checker-formatting API additions.

No open issues 🎉

1 resolved since last review
1 file not reviewed
  • tsc/internal/api/enum_values_generated.go: Generated file

Review effort: Balanced

@andrewbranch Andrew Branch (andrewbranch) changed the title [api] Checker formatting APIs [api] Checker node builder APIs Nov 19, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@andrewbranch
Andrew Branch (andrewbranch) marked this pull request as ready for review November 19, 2026 21:28
@andrewbranch
Andrew Branch (andrewbranch) added this pull request to the merge queue Nov 20, 2026
Merged via the queue into microsoft:main with commit 6d76d13 Nov 20, 2026
34 checks passed
@andrewbranch
Andrew Branch (andrewbranch) deleted the checker-formatting-apis branch November 20, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants