In Swift, I can get the type of a variable with
type(of: myvariable), but how can I use this type to declare another variable.
let a = 1 typealias typeofA = type(of: a) // expected: Int let b: typeofA
However, the statement
typealias typeofA = type(of: a) has a compile error. So how can I achieve my goal?