in Sources/MockoloFramework/Models/ArgumentsHistoryModel.swift [16:32]
init?(name: String, genericTypeParams: [ParamModel], params: [ParamModel], isHistoryAnnotated: Bool, suffix: String) {
// Value contains closure is not supported.
let capturables = params.filter { !$0.type.hasClosure && !$0.type.isEscaping && !$0.type.isAutoclosure }
guard !capturables.isEmpty else {
return nil
}
self.name = name + .argsHistorySuffix
self.suffix = suffix
self.isHistoryAnnotated = isHistoryAnnotated
self.capturableParamNames = capturables.map(\.name.safeName)
self.capturableParamTypes = capturables.map(\.type)
let genericTypeNameList = genericTypeParams.map(\.name)
self.type = Type.toArgumentsHistoryType(with: capturableParamTypes, typeParams: genericTypeNameList)
}