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

2024-03-15

我尝试记录函数的闭包参数:

/**
    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 {

产生“无描述”

我找不到如何改变它的描述

Apple markup documentation of no help is here https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/index.html#//apple_ref/doc/uid/TP40016497-CH2-SW1

NSHipster 提供的更多文档并未解决关闭问题 http://nshipster.com/swift-documentation/


显然,自 2017 年 1 月以来,这个问题就被破坏了(或者从未在任何 xcode 中工作过):

https://bugs.swift.org/browse/SR-3693 https://bugs.swift.org/browse/SR-3693所以我的问题似乎是最新版本如何在 Swift 3 中记录函数闭包参数的参数? https://stackoverflow.com/questions/38669725/how-do-you-document-the-parameters-of-a-functions-closure-parameter-in-swift-3

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

向苹果提交 35881586

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何记录作为参数的闭包的参数 的相关文章

随机推荐