TypeName
@objcMembers public final class TypeName: NSObject, AutoCoding, AutoEquatable, AutoDiffable, AutoJSExport, LosslessStringConvertible
Describes name of the type used in typed declaration (variable, method parameter or return value etc.)
-
Type name used in declaration
Declaration
Swift
public let name: String
-
The generics of this TypeName
Declaration
Swift
public var generic: GenericType?
-
Whether this TypeName is generic
Declaration
Swift
public let isGeneric: Bool
-
Actual type name if given type name is a typealias
Declaration
Swift
public var actualTypeName: TypeName?
-
Type name attributes, i.e.
@escaping
Declaration
Swift
public let attributes: [String: Attribute]
-
Whether type is optional
Declaration
Swift
public let isOptional: Bool
-
Whether type is implicitly unwrapped optional
Declaration
Swift
public let isImplicitlyUnwrappedOptional: Bool
-
Type name without attributes and optional type information
Declaration
Swift
public let unwrappedTypeName: String
-
Whether type is void (
Void
or()
)Declaration
Swift
public var isVoid: Bool
-
Whether type is a tuple
Declaration
Swift
public var isTuple: Bool
-
Tuple type data
Declaration
Swift
public var tuple: TupleType?
-
Whether type is an array
Declaration
Swift
public var isArray: Bool
-
Array type data
Declaration
Swift
public var array: ArrayType?
-
Whether type is a dictionary
Declaration
Swift
public var isDictionary: Bool
-
Dictionary type data
Declaration
Swift
public var dictionary: DictionaryType?
-
Whether type is a closure
Declaration
Swift
public var isClosure: Bool
-
Closure type data
Declaration
Swift
public var closure: ClosureType?
-
Returns value of
name
property.Declaration
Swift
public override var description: String