type IElement = interface end
type IButton = inherit IElement
type IImage = inherit IElement
let createButton (props: (IButton -> unit) list) = ()
module InitialApiDesign =
type Property<'a, 't>() =
static member (@=) (prop: Property<'a, 't>, value: 'a) =
let Width = Unchecked.defaultof<Property<float, IElement>>
let Height = Unchecked.defaultof<Property<float, IElement>>
let IsEnabled = Unchecked.defaultof<Property<bool, IButton>>
let ImageSource = Unchecked.defaultof<Property<string, IImage>>
(let z = Width @= 20.0 in z)
module AlternativeApiDesign =
let Width (_: float) (_: IElement) = ()
let Height (_: float) (_: IElement) = ()
let IsEnabled (_: bool) (_: IButton) = ()
let ImageSource (_: string) (_: IImage) = ()