struct Validator<T> { typealias Key = PartialKeyPath<T> mutating func notEmpty<X>(for key: KeyPath<T, X> , _ value: String) -> Bool { ... } var validator = Validator<Props>() _ = validator.notEmpty(for: \.name, props.name)
<X>
ださい・・・KeyPath<T, X>
から PartialKeyPath<T>
への変換は暗黙変換だから