Type Aliases and Constants
typealias gives a type a new name. Use static let in a type for constants.
Example
typealias ID = Int
let id: ID = 5
enum Limits { static let max = 100 }
print(id, Limits.max)Exercise
Alias keyword.
ID = IntQuiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.