Skip to content

fix(ttsc): more shim features.#28

Merged
samchon merged 2 commits intomasterfrom
fix/shim
Apr 29, 2026
Merged

fix(ttsc): more shim features.#28
samchon merged 2 commits intomasterfrom
fix/shim

Conversation

@samchon
Copy link
Copy Markdown
Owner

@samchon samchon commented Apr 29, 2026

This pull request adds several new type and flag exports to the shim layers for the TypeScript compiler's AST and type checker, expanding the available API surface for downstream consumers. It also introduces a new function for retrieving base types from the checker. The most important changes are grouped below:

AST Shim Enhancements

  • Added new type exports: TypePredicateParameterName and AssertsKeyword to shim.go, making these AST node types available for consumers.
  • Added new constant exports for node and modifier flags: KindAssertsKeyword, ModifierFlagsPrivate, ModifierFlagsProtected, and ModifierFlagsReadonly. [1] [2]

Type Checker Shim Enhancements

  • Added new type and flag exports: ElementFlags type and constants such as ObjectFlagsClass, ObjectFlagsInterface, ObjectFlagsClassOrInterface, ElementFlagsNone, ElementFlagsRequired, ElementFlagsOptional, ElementFlagsRest, and ElementFlagsVariadic. [1] [2]

New Checker Utility

  • Introduced a new function Checker_getBaseTypes (and its linked internal implementation) for retrieving the base types of a given type from the checker, improving type introspection capabilities.

@samchon samchon self-assigned this Apr 29, 2026
Copilot AI review requested due to automatic review settings April 29, 2026 12:14
@samchon samchon added the enhancement New feature or request label Apr 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the ttsc shim API surface by exporting additional TypeScript AST/checker types and flags, and adds a new checker helper to retrieve a type’s base types for downstream consumers.

Changes:

  • Export additional checker flags/types (ElementFlags, ObjectFlags*, ElementFlags*) from the checker shim.
  • Export additional AST types/flags (TypePredicateParameterName, AssertsKeyword, KindAssertsKeyword, ModifierFlags*) from the AST shim.
  • Add Checker_getBaseTypes via //go:linkname to expose the internal checker getBaseTypes implementation with a nil-safe wrapper.

Reviewed changes

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

File Description
packages/ttsc/shim/checker/shim.go Adds ElementFlags exports, additional flag constants, and a Checker_getBaseTypes shim wrapper around an internal checker method.
packages/ttsc/shim/ast/shim.go Exposes additional AST node types and new kind/modifier flag exports in the AST shim.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samchon samchon merged commit 3694cb4 into master Apr 29, 2026
9 of 11 checks passed
@samchon samchon deleted the fix/shim branch April 29, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants