Skip to content

Fix for transpile issue with typecast statement with intersection and inline interface - #1652

Merged
TwitchBronBron merged 4 commits into
v1from
fix_complicated_transpile_issue
Sep 2, 2026
Merged

Fix for transpile issue with typecast statement with intersection and inline interface#1652
TwitchBronBron merged 4 commits into
v1from
fix_complicated_transpile_issue

Conversation

@markwpearce

Copy link
Copy Markdown
Collaborator

Fix for: #1651

  • Added test for broken transpile
  • Fix issue

@markwpearce markwpearce changed the title FIx for transpile issue with typecast statement with intersection and inline interface Fix for transpile issue with typecast statement with intersection and inline interface Mar 20, 2026
TwitchBronBron and others added 3 commits September 2, 2026 09:28
`TypeExpression.getName()` only handled dotted-get chains, returning
`undefined` for unions/intersections, inline interfaces, typed arrays,
typed function types, and groupings. `TypecastStatement.transpile()` put
that `undefined` straight into its TranspileResult, crashing source-map.

Adds `util.getTypeExpressionName()`, which reconstructs the written name
for those shapes, and uses it as the fallback in `getName()`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This test builds 100 components and validates the whole program twice,
which runs ~300ms locally but blew past the default 2s mocha timeout on
a loaded macOS CI runner. Bumped just this test to 30s rather than
raising the global timeout, which would mask real hangs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@TwitchBronBron
TwitchBronBron marked this pull request as ready for review September 2, 2026 13:56

@TwitchBronBron TwitchBronBron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I got it fixed. We'll ship this, and feel free to open a new PR with any further issues you might encounter.

@TwitchBronBron
TwitchBronBron merged commit c532b4e into v1 Sep 2, 2026
11 checks passed
@TwitchBronBron
TwitchBronBron deleted the fix_complicated_transpile_issue branch September 2, 2026 13:56
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.

2 participants