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.
init
1 parent 328a5b7 commit 3b305b7Copy full SHA for 3b305b7
Plugins/BridgeJS/Sources/BridgeJSTool/ImportTS.swift
@@ -237,7 +237,7 @@ struct ImportTS {
237
preconditionFailure("assignThis can only be called with a jsObject return type")
238
}
239
abiReturnType = .i32
240
- body.append("self.this = ret")
+ body.append("self.this = JSObject(id: UInt32(bitPattern: ret))")
241
242
243
func renderImportDecl() -> DeclSyntax {
Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ImportTSTests/TypeScriptClass.swift
@@ -34,7 +34,7 @@ struct Greeter {
34
_make_jsstring(b.baseAddress.unsafelyUnwrapped, Int32(b.count))
35
36
let ret = bjs_Greeter_init(nameId)
37
- self.this = ret
+ self.this = JSObject(id: UInt32(bitPattern: ret))
38
39
40
func greet() -> String {
0 commit comments