Back to Sourcery

ClosureType

docs/Classes/ClosureType.html

2.3.02.9 KB
Original Source

ClosureType

@objcMembers
public final class ClosureType : NSObject, SourceryModel, Diffable
extension ClosureType: NSCoding

Describes closure type

`

                name
                `

Type name used in declaration with stripped whitespaces and new lines

Declaration

Swift

public let name: String

`

                parameters
                `

List of closure parameters

Declaration

Swift

public let parameters: [ClosureParameter]

`

                returnTypeName
                `

Return value type name

Declaration

Swift

public let returnTypeName: TypeName

`

                actualReturnTypeName
                `

Actual return value type name if declaration uses typealias, otherwise just a returnTypeName

Declaration

Swift

public var actualReturnTypeName: TypeName { get }

`

                returnType
                `

Actual return value type, if known

Declaration

Swift

public var returnType: Type?

`

                isOptionalReturnType
                `

Whether return value type is optional

Declaration

Swift

public var isOptionalReturnType: Bool { get }

`

                isImplicitlyUnwrappedOptionalReturnType
                `

Whether return value type is implicitly unwrapped optional

Declaration

Swift

public var isImplicitlyUnwrappedOptionalReturnType: Bool { get }

`

                unwrappedReturnTypeName
                `

Return value type name without attributes and optional type information

Declaration

Swift

public var unwrappedReturnTypeName: String { get }

`

                isAsync
                `

Whether method is async method

Declaration

Swift

public let isAsync: Bool

`

                asyncKeyword
                `

async keyword

Declaration

Swift

public let asyncKeyword: String?

`

                throws
                `

Whether closure throws

Declaration

Swift

public let `throws`: Bool

`

                throwsOrRethrowsKeyword
                `

throws or rethrows keyword

Declaration

Swift

public let throwsOrRethrowsKeyword: String?

`

                throwsTypeName
                `

Type of thrown error if specified

Declaration

Swift

public let throwsTypeName: TypeName?

`

                asSource
                `

Declaration

Swift

public var asSource: String { get }

`

                diffAgainst(_:)
                `

Declaration

Swift

public func diffAgainst(_ object: Any?) -> DiffableResult

Copyright © 2016-2021 Pixle. All rights reserved.

Generated by jazzy ♪♫ v0.14.0, a Realm project.