init?()

in Sources/MockoloFramework/Models/ArgumentsHistoryModel.swift [28:44]


    init?(name: String, genericTypeParams: [ParamModel], params: [ParamModel], isHistoryAnnotated: Bool) {
        // 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.isHistoryAnnotated = isHistoryAnnotated

        self.capturableParamLabels = capturables.map(\.name.safeName)

        self.capturedValueType = SwiftType.toArgumentsCaptureType(
            with: capturables.map { ($0.name, $0.type) },
            typeParams: genericTypeParams.map(\.name)
        )
    }