gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 01:47:14 24 4
gpt4 key购买 nike

我试图记录一个函数的闭包参数:

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

最佳答案

显然,自 2017 年 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

关于swift3 - 如何记录作为参数的闭包的参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47675488/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com