Skip to content

Add automatic TypeScript and TSX execution - #27

Merged
dnnsjsk merged 3 commits into
mainfrom
feat/typescript
Oct 25, 2026
Merged

dnnsjsk merged 3 commits into
mainfrom
feat/typescript

Conversation

@dnnsjsk

@dnnsjsk dnnsjsk commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Phasis now loads .ts and .tsx files through its existing APIs without a language flag or a runtime compiler. The PHP parser consumes erasable TypeScript syntax and retains executable JavaScript nodes; TSX uses the existing JSX lowering and renderer. .mts and .cts, module lookup, parsed-module caching, CLI AST output and PHP child execution also recognize typed files.

Explicit type-only imports and exports do not resolve their targets. Constructs requiring TypeScript runtime code generation report syntax errors. The supported boundary is documented in docs/typescript.md. Parse-cache identities distinguish JavaScript, TypeScript and TSX, including when the lower-level loader infers JSX options from a filename.

Validation:

  • XDEBUG_MODE=off ./bin/verify-all: passed, 2,548 tests / 6,890 assertions, with two existing skips; static analysis, coding standards and all 16 oracle scenarios passed.
  • Canonical test262 matrix: 53,616/53,616 passed, zero failures/skips/blocked/pending cases. The committed report's source identity matches this branch.
  • Focused TypeScript/cache checks: 106 tests passed, including native Node/esbuild execution oracles, a 108-case assertion and side-effect matrix, existing JSX AST comparisons, malformed-input and directive tests, and both cache parse goals.
  • JSX rendering, precompile and development/production hydration passed. The isolated Composer consumer passed on PHP 8.2 through 8.5.
  • CI, Popular Packages, Web Platform Tests, dependency audit and documentation checks passed on the final implementation commit d5663bb.

Framework compatibility remains permanently local-only and was not run.

@dnnsjsk
dnnsjsk merged commit 40264fe into main Oct 25, 2026
@dnnsjsk
dnnsjsk deleted the feat/typescript branch October 25, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant