如何记录作为参数的闭包的参数

时间:2017-12-06 13:27:06

标签: swift3 markdown

我尝试将闭包参数记录到函数中:

/**
    sends the request out.

    - Parameter pzurl: request description including url, method, formdata.
 - Parameter responseProcessor: closure that's on success invokes
 - Parameter json: a json array or dictionary
 - Parameter timestamp: and the same `timestamp` that this function returns
 - parameter failure: closure is invoked when json could not be parsed or remote indicated failure
 - Returns: timestamp to identify responses
 */
internal static func processPZURL(pzurl: PZURL,
                                  responseProcessor:@escaping (_ json:JSON, _ timestamp: TimeInterval) -> (), failure:@escaping (PZError) -> ()) -> TimeInterval {

产生“无描述”

我找不到如何更改

的说明

enter image description here

Apple markup documentation of no help is here

more documentation from NSHipster that does not address the closure woe

1 个答案:

答案 0 :(得分:3)

显然,自今年1月以来(或从未在任何xcode中工作过),这一点已经被破坏了:

https://bugs.swift.org/browse/SR-3693 所以我的问题似乎重复了 How do you document the parameters of a function's closure parameter in Swift 3?

除了该问题的答案在xcode 9.2中不起作用

用苹果提交35881586