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] Generated JSTypedClosure initializer is always internal #709

Copy link
Copy link
@sliemeobn

Description

@sliemeobn
Issue body actions

I have a type like this in a target:

@JSClass(jsName: "Document")
public struct JSDocument {
     // ...
    @JSFunction public func addEventListener(_ type: String, _ listener: JSTypedClosure<(JSEvent) -> Void>) throws(JSException)
    @JSFunction public func removeEventListener(_ type: String, _ listener: JSTypedClosure<(JSEvent) -> Void>) throws(JSException)
}

unfortunately, I cannot directly initialize a JSTypedClosure<(JSEvent) -> Void> in another target, because the generated init is internal.

not sure how to best solve this, but currently you'll need to manually add some public/package function to actually be able to make such a closure.

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.