📜  使 closuere 成为可选的 switf - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:25.183000             🧑  作者: Mango

代码示例1
func then(onFulfilled: ()->(), onReject: (()->())?){       
    if let callableRjector = onReject {
      // do stuff! 
    }
 }