I need a datatype that will be completely opaque in F# with equality defined in terms of JS ===
. WebSharper manual says that I should override Equals
but I can't make it work.
let x : OpaqueType = X<_>
let f (y : OpaqueType) =
if x = y then // this line should be translated to `if (x === y)`
42
else
10
So, what is the correct definition of OpaqueType
?
Of course, I can use obj
and add an inline function that will do x === y
but I'd like to have something more awesome.