I have this code in my project
#if os(macOS)
import Cocoa
typealias Image = NSImage
#elseif os(iOS)
import UIKit
typealias Image = UIImage
#endif
Because of this, in a file with import SwiftUI
I would have to use SwiftUI.Image
to disambiguate. Is it possible to declare that whenever I use Image
in that file, it should not use my internal declaration but the SwiftUI
type instead?