Swift.
Here’s how we can achieve this: extension Button where Label == Image { init(iconName: String, action: @escaping () -> Void) { self.init(action: action) { Image(systemName: iconName) } } } In the code above, we extend the `Button` type with a generic constraint that restricts the extension to cases