Basics: Type Aliases

Type Aliases — Define an alternative name for an existing type.

Typealias AudioSample = UInt16
Var maxAmplitudeFound = AudioSample.min
// maxAmplitudeFound is now 0

Additional information

  • Are useful when you want to refer to an existing type by a name that is contextually more appropriate, such as when working with data of a specific size from an external source.

Basics: Type Aliases — Structure map

Clickable & Draggable!

Basics: Type Aliases — Related pages: