example function // example static function现在,我花了一些时间设置闭包编译器注释,最终消除了所有警告。然后我读到了关于导出函数的内容,但是window['MyClass'] = MyClass只会导出构造函数。老实说,我不想单独导出每个方法。我认为编译器会导出所有公开可用的
(UIAlertAction(title: "Edit", style: .default) { _ in })
}转义闭包捕获非转义参数当我查看UIAlertAction构造函数的定义时,它看起来如下@MainActor open class UIAlertAction : NSObject= nil)由于handler没有handler关键字,所以我