Max Chuquimia
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.

    Max Chuquimia

    Written by

    Senior Software Engineer, Electronics Enthusiast, Appreciator of Music

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade