Larger packages are often split into multiple modules. For example, a package could contain a foundational Vector3D type in a Core module which is used by the public interface of the App module.
// “Core” Module
@JS public struct Vector3D {
let x: Double
let y: Double
let z: Double
}
// “App” Module
import Core
@JS func currentVelocity() -> Vector3D {
// ...
}
Currently, the “App” module would have to wrap any types defined in other modules, or everything would have to be defined in the one module. Both of these workarounds are undesirable.
This could possibly work by parsing the BridgeJS.json skeleton of dependent targets in the code generation plugin. Further thought would probably be needed regarding ahead of time generation.
Larger packages are often split into multiple modules. For example, a package could contain a foundational
Vector3Dtype in aCoremodule which is used by the public interface of theAppmodule.Currently, the “App” module would have to wrap any types defined in other modules, or everything would have to be defined in the one module. Both of these workarounds are undesirable.
This could possibly work by parsing the
BridgeJS.jsonskeleton of dependent targets in the code generation plugin. Further thought would probably be needed regarding ahead of time generation.