Skip to content

Conversation

@kateinoigakukun
Copy link
Member

Fixes #497.

  • Treat @JSClass declarations written as class/actor as JS object wrapper types when they appear in exported signatures.
  • Add BridgeJSTool snapshot coverage.
  • Add runtime regression coverage (exports returning imported JS class instances).

…s in exported APIs by treating `@JSClass` **classes/actors** as `.jsObject` (previously they were misclassified as Swift heap objects, producing JS like `Foo.__construct(...)`).

- Fix: `Plugins/BridgeJS/Sources/BridgeJSCore/SwiftToSkeleton.swift`
- Regression test + snapshots: `Plugins/BridgeJS/Tests/BridgeJSToolTests/Inputs/ImportedTypeInExportedInterface.swift`, `Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js`, `Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.d.ts`, `Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ImportedTypeInExportedInterface.swift`, `Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ImportedTypeInExportedInterface.json`
- Verified with `swift test --package-path ./Plugins/BridgeJS`
@kateinoigakukun kateinoigakukun force-pushed the bridgejs-imported-ts-type-export-interface branch from bbaa0a5 to d9d6c56 Compare January 26, 2026 09:00
@krodak krodak merged commit 38a937c into main Jan 26, 2026
9 checks passed
@krodak krodak deleted the bridgejs-imported-ts-type-export-interface branch January 26, 2026 10:16
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.

[BridgeJS] Support imported TS type usage on exported interface

3 participants