From accfd963a891c0c7fd33d6bdb76de7479b201121 Mon Sep 17 00:00:00 2001 From: Shivanshu <112751483+shivanshu877@users.noreply.github.com> Date: Sat, 9 May 2026 12:40:14 +0530 Subject: [PATCH] fix: use `export type` for SwiftRuntimeThreadChannel re-export SwiftRuntimeThreadChannel is a type alias, not a value. Re-exporting it with `export { ... }` causes esbuild and rolldown (which run in isolatedModules mode) to fail with "cannot re-export a type using 'export { ... }'" because the bundler cannot tell the export is type-only at the module boundary. Changing to `export type { SwiftRuntimeThreadChannel }` makes the intent explicit and restores compatibility with esbuild/rolldown-based build tools (Vite, etc.) without affecting tsc or any runtime behaviour. Reported in https://github.com/swiftwasm/JavaScriptKit/issues/477 --- Runtime/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/src/index.ts b/Runtime/src/index.ts index 7d75a6801..208dd8380 100644 --- a/Runtime/src/index.ts +++ b/Runtime/src/index.ts @@ -20,7 +20,7 @@ import { } from "./itc.js"; import { decodeObjectRefs } from "./js-value.js"; import { JSObjectSpace } from "./object-heap.js"; -export { SwiftRuntimeThreadChannel }; +export type { SwiftRuntimeThreadChannel }; export type SwiftRuntimeOptions = { /**