2

Being new to WebSharper I am looking for documentation and examples on Operators such as ? , ?<- , -< , ===. , => or |>!. I did not find it in http://websharper.com/docs. Did I miss it? (there are some listed in http://websharper.com/docs/wig#heading-2-2 but i believe those are only for creating interfaces for existing JS libraries.) Some are listed here(3 years ago), do those still apply to UI.Next html?

Goswin Rothenthal
  • 2,244
  • 1
  • 19
  • 32

1 Answers1

3

The operators you mentioned were added by WebSharper for convenience.

For example ?<- is used to mutate a property of an object.

Here's its implementation:

[<Inline "void ($obj[$key] = $value)">]
let ( ?<- ) (obj: obj) (key: string) (value: obj) = X<unit>

All the operators can be found in WebSharper code base under JavaScript.Pervasives.fs.

Kimserey
  • 73
  • 1
  • 5