What is typealias in Swift
What is type alias?
- A type alias allows you to provide a new name for an existing data type into your program.
- Type alias does not create new types they simply provide a new name to an existing type.
- The main purpose of type alias is to make our code more readable.
Example:
typealias Name = String
let firstName:Name = "Pawan"
Thanks for reading, Happy Coding 👨💻