At all
You can import a specific object, as well as the entire module:
import struct SomeModule.SomeStruct import class SomeModule.SomeClass import func SomeModule.someFunc
See the complete list of types of "imported" types in the import-kind rule of Swift grammar .
Then you can create typealias :
typealias SMSomeStruct = SomeModule.SomeStruct
And, like in Swift 3, import declarations are not merged with aliasing.
Examination of Collisions with Foundation Entities
Say you have a class SomeModule.NumberFormatter .
It is enough to create two typealias es in a separate Swift file (in the import project) to prevent conflicts:
import Foundation import SomeModule typealias NumberFormatter = Foundation.NumberFormatter typealias SMNumberFormatter = SomeModule.NumberFormatter
source share