Closed sindresorhus closed 5 years ago
Protocols cannot have a tested types, which is why we currently have PreferencePaneIdentifier, but I just realized we can use typealias to achieve PreferencesPane.Identifier. As a bonus it's now shorter to define the identifiers too.
PreferencePaneIdentifier
typealias
PreferencesPane.Identifier
// @DivineDominion
This is clever, I like it :)
Protocols cannot have a tested types, which is why we currently have
PreferencePaneIdentifier
, but I just realized we can usetypealias
to achievePreferencesPane.Identifier
. As a bonus it's now shorter to define the identifiers too.// @DivineDominion