Sep 9, 2018 · 1 min read
Thanks Phillip!
I wouldn’t expect the examples you’ve given (articles included) to work because you are essentially calling someFunction to get a value (in this case the value is Void). Even if you removed the () , I still wouldn’t expect typealias SomeTypealias = someFunction to work as you are trying to pass the “reference” to someFunction (so changing typealias to let in that case would work).
What I would logically expect to work is:
typealias SomeTypealias = type(of: someFunction)as that should be truly getting the signature/type of someFunction and aliasing it. Try running print(type(of: someFunction)) and see what you get.
