SE-0258: Property Wrappers (second review)

Will property wrapper initialization support trailing closures?

@propertyWrapper
public struct WithCustomDerivative<T> {
  ...
  public init(
    initialValue: Value,
    derivativeTransform: @escaping (T) -> T
  ) {
    ...
  }
}
struct Foo {
  @WithCustomDerivative { $0 / 2 }
  var x: Float = 0
}
9 Likes