We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSTypedClosure
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.
JSTypedClosure<(JSEvent) -> Void>
init
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.
public
package
I have a type like this in a target:
unfortunately, I cannot directly initialize a
JSTypedClosure<(JSEvent) -> Void>in another target, because the generatedinitis internal.not sure how to best solve this, but currently you'll need to manually add some
public/packagefunction to actually be able to make such a closure.