How to define a static member in an Interface?
Why it is not possible?
I want to force a F# type (class) to have a static method to create an instance of itself from a string (JSON parsing). I want this Interface example:
[<Interface>]
type public ILikeJson<'T> =
abstract member ToJson: unit -> string // OK
static abstract member FromJson: string -> 'T // <-- "static" is not valid here !
Alternatively a constructor from a string can do the work but a static method sounds better because it will have an appropriate name and I don't know how to define a constructor in the Interface too.