WebSharper 4.2.13
This is a feature release for WebSharper 4.2.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.2.13.239
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.2.13.239.vsix
Enhancements
- #954 More support for
decimal
, numeric conversions,abs
,sign
all work as expected on client-side. Referencing theWebSharper.MathJS
nuget package is still needed for using decimals (as well asComplex
andBigInteger
), which is now have a version that is matchingWebSharper
package version because of tighter coupling. - #956 Added client-side support for
DateTime.DaysInMonth/IsLeapYear
. - #900 Added a new attribute called
JavaScriptExport
. This can be used to mark parts of code (members or whole types, files or assemblies) to be always included in JavaScript output forBundle
/BundleOnly
projects (serving additional starting points for dead-code elimination next toSPAEntryPoint
). AlsoSPAEntryPoint
is now optional. See ticket #900 for full specification. - The
JavaScript
attribute has also got enhancements, same asJavaScriptExport
:- You can now have multiple
JavaScript
attributes, this is useful on assembly-level for annotating multiple types/files remotely. - You can use a type as argument, for example
[<JavaScript(typeof<MyType>)>]
. This is equivalent to marking the type named with[<JavaScript>]
. The attribute must be on the assembly or on a type/module that is containing the targeted type as a nested type.
- You can now have multiple
Fixes
- #953
Dictionary
methods do not returnundefined
instead offalse
.