Is there any way to return a *type* (not an *instance*) as an opaque type?

(some PublicProtocol).Type

@Slava_Pestov Ohh… wow! That's what I was looking for this whole time!

public var PublicType: some PublicProtocol.Type {
  return PrivateStruct.self
}

This code never worked… and this whole time it's because I was missing the round braces! Ahh… good to know! Thanks!

2 Likes