Returns a new instance by overriding the values passed as arguments
YDoc copyWith({int /*U32*/ ? ref}) => YDoc(ref: ref ?? this.ref);