Skip to content

Commit accfd96

Browse files
committed
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 #477
1 parent 6ea916b commit accfd96

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Runtime/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
} from "./itc.js";
2121
import { decodeObjectRefs } from "./js-value.js";
2222
import { JSObjectSpace } from "./object-heap.js";
23-
export { SwiftRuntimeThreadChannel };
23+
export type { SwiftRuntimeThreadChannel };
2424

2525
export type SwiftRuntimeOptions = {
2626
/**

0 commit comments

Comments
 (0)