Добрый день, есть несколько типов наподобие
type T1() =
let mutable _a = ""
member x.a
with get() = _a
and set(v) = _a <- v
member x.Other1 = ()
type T2() =
let mutable _a = ""
member x.a
with get() = _a
and set(v) = _a <- v
member x.Other2 = ()
Меня устроит примерно следующее, если заставить это работать:
type IT =
abstract member a : string
type T1() =
let mutable _a = ""
interface IT with
member x.a
with get() = _a
and set(v) = _a <- v
member x.Other1 = ()
type T2() =
let mutable _a = ""
interface IT with
member x.a
with get() = _a
and set(v) = _a <- v
member x.Other2 = ()
type TModel (t : IT) =
member x.a
with get() = t.a
and set(v) = t.a <- v