Available Libraries

To interact with the outside world (aside from using dynamic) you need a metadata library. Libraries are installed using NuGet. The currently existing libraries are:

Saltarelle.Runtime

The runtime library. Required for any code to compile. For the code to run, you must also ensure that one of the mscorlib.js files distributed with this project is included on your web page.

Saltarelle.Linq

This library allows you to use the namespace System.Linq. With it comes support for query expressions (strictly speaking, query expressions don’t require this package as it is just a syntactic transform). Using this library requires the file linq.js, distributed with this package, to be included on the page.

Note: Even though this package builds on Linq.JS,it is slightly incompatible with the official release of that project, so you have to include the file supplied with this package instead.

Saltarelle.NodeJS

This library contains metadata required to write applications that run in node.js. It is pure metadata, no include at runtime is required.

Saltarelle.Web

This library contains metadata required to interact with the browser DOM. It is pure metadata, no include at runtime is required.

Saltarelle.jQuery

This library contains metadata required to use jQuery on your site. It is pure metadata, but of course your page needs to include the official jQuery script.

Saltarelle.jQuery.UI

This library contains metadata required to use jQuery UI on your site. It is pure metadata, but of course your page needs to include the official jQuery UI script.

Saltarelle.Knockout

This library contains metadata required to use KnockoutJS on your site. It is pure metadata, but of course your page needs to include the official KnockoutJS script.

Saltarelle.Loader

This library contains the script loader functionality available in Script#. Only recommended to be used if you are migrating from Script# and want to change your code as little as possible. For new code, it is recommended to use jQuery instead. Using this lbrary requires the file ssloader.js, distributed with the package, to be included on the page.

Writing your Own

If the framework you want to use is not listed above, you can write your own library for it. A metadata library is nothing but an assembly (or a set of types; they don’t even have to live in their own assembly although this is preferred) with attributes.