Skip Navigation
Type MethodMethod

normalisedType(_:)

Returns the swift-docc-render topic type for a navigator or reference type name.

static func normalisedType(_ type: String) -> String

Parameters

type

A type name, such as struct, instanceMethod or article.

Return Value

The normalised topic type.

Discussion

Synonyms are mapped like swift-docc-render’s TopicTypeAliases (initialisers and deinitialisers show as methods, enumeration cases as enumerations), and the long kind names of symbol graphs (such as structure or instanceMethod) are mapped to the short type names of the navigator index.