0
comment
comment
on 12/2/2014 8:37 AM
A lot of useful functions of FSharp.Core are now translatable by WebSharper.
Async cancellation
- Proxies for
CancellationTokenSource,CancellationToken,CancellationTokenRegistration. - Proxies for
Asyncclass members:DefaultCancellationToken,CancelDefaultToken,CancellationToken,OnCancel,TryCancelled - Async RPC calls are cancellable, the cancel continuation runs ASAP and the response are discarded.
MailboxProcessor
- Proxy handles timeout arguments and cancellation
PostAndReply/TryPostAndReplymethods are not supported as JS is single-threaded.
Printf
- Proxies for
sprintf, printfn, failwithf, Printf.kbprintf %Ouses JavaScriptString(x)function%Agenerates a recursive pretty-printer for F# types if type information is available. Currently supports lists, unions, tuples, records, 1 and 2 dimensional arrays. Other types are sent to a dynamic pretty-printer.printfnprints to JavaScript consolePrintf.sprintfis not supported, useExtraTopLevelOperators.sprintfinstead.- Printing as unsigned is not supported.
Fixes
- Fix #300: Server-side runtime error in some regional settings (for example Turkish)
- Fix #304: Converting string to char checks string length now
Async.FromContinuationsensures that continuation is called only once, throws an error otherwise.
Breaking changes
System.Web.HttpPostedFiletype in Sitelets API have been changed toSystem.Web.HttpPostedFileBaseto enable non-ASP.NET hosting (OWIN).- Indexed properties in WIG: Previously if a property was defined with name
"item", it translated to a an indexer on the object. This is changed so that the empty string is usable for this (still will get .NET property name Item, the default indexer for the class).
1 2
// generates default .NET indexer "" =@ T<obj> |> Indexed T<int> // has JavaScript inline "$this[$index]"






