wendux / DSBridge-IOS

:earth_asia: A modern cross-platform JavaScript bridge, through which you can invoke each other's functions synchronously or asynchronously between JavaScript and native.
1.95k stars 303 forks source link

原生异步函数如何支持重载? #135

Open yanghl opened 3 years ago

yanghl commented 3 years ago

@objc func testAsyn( _ arg:String, block: (String, Bool)->Void) { block(String(format:"%@[Swift async call:%@]", arg, "test"), true) }

@objc func testAsyn( _ arg:String, handler: (String, Bool)->Void) { handler(String(format:"%@[Swift async call:%@]", arg, "test"), true) }

比如这种情况 第二个函数js永远无法调用成功了