Repository navigation
Expose some type checker features that were available in TS6 - #64535
Titian Cernicova-Dragomir (dragomirtitian) wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Zero-valued formatting arguments are misinterpreted, escaped-name typing is widened, and unique-symbol behavior lacks regression coverage.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Exposes additional TypeScript 6 checker capabilities through the async and sync APIs.
Changes:
- Adds union-origin, conditional-inference, unique-symbol, and symbol-formatting APIs.
- Adds protocol support and
SymbolFormatFlags. - Adds API and parity tests.
| File | Description |
|---|---|
tsc/internal/checker/types.go |
Exposes checker type metadata. |
tsc/internal/api/session.go |
Handles new API requests. |
tsc/internal/api/proto.go |
Defines protocol methods and payloads. |
tsc/internal/api/enum_values_generated.go |
Registers symbol-format enum values. |
tools/scripts/tsc/generate-enums.ts |
Adds enum generation configuration. |
packages/typescript/test/sync/api.test.ts |
Adds generated sync API tests. |
packages/typescript/test/sync/api-generators.test.ts |
Adds batching parity coverage. |
packages/typescript/test/async/api.test.ts |
Adds async API tests. |
packages/typescript/src/enums/symbolFormatFlags.ts |
Adds runtime enum output. |
packages/typescript/src/enums/symbolFormatFlags.enum.ts |
Adds typed enum output. |
packages/typescript/src/api/sync/types.ts |
Adds generated sync declarations. |
packages/typescript/src/api/sync/api.ts |
Adds generated sync implementations. |
packages/typescript/src/api/proto.generated.ts |
Adds generated protocol declarations. |
packages/typescript/src/api/async/types.ts |
Adds async public type declarations. |
packages/typescript/src/api/async/api.ts |
Implements the async APIs. |
Files not reviewed (1)
- tsc/internal/api/enum_values_generated.go: Generated file
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| Meaning uint32 `json:"meaning,omitempty"` | ||
| Flags int32 `json:"flags,omitempty"` |
| isUniqueESSymbolType(): this is UniqueESSymbolType { | ||
| return isUniqueESSymbolType(this); | ||
| } |
…eatures # Conflicts: # packages/typescript/src/api/async/api.ts # packages/typescript/src/api/sync/api.ts # packages/typescript/test/async/api.test.ts # packages/typescript/test/sync/api-generators.test.ts # packages/typescript/test/sync/api.test.ts
- Type UniqueESSymbolType.escapedName as __String. - Preserve an explicit SymbolFormatFlags.None in symbolToString; only omitted flags default to AllowAnyNodeKind. Pass meaning through unchanged so an omitted meaning behaves like SymbolFlags.None, as in Strada. - Add regression tests for explicit None flags, omitted meaning, and unique symbol escaped names. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-language integration needs human validation, and unique-symbol name serialization still requires correction.
3 open findings
1 resolved since last review
Files not reviewed (1)
- tsc/internal/api/enum_values_generated.go: Generated file
🧠 Review effort: Balanced
A unique symbol declared by a late-bound member embeds that member's internal name, so escape every "\xFE" marker rather than only the leading one in both UniqueESSymbolType.escapedName and Symbol.escapedName. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
No blocking defects were identified, but cross-language API and generated-client validation remains unverified.
2 open issues
1 resolved since last review
1 file not reviewed
tsc/internal/api/enum_values_generated.go: Generated file
Review effort: Balanced



Fixes #64533