Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[BridgeJS] Support @JS type references across modules within the same package #720

Copy link
Copy link
@wfltaylor

Description

@wfltaylor
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.