// Modules and Comprehensive Standard Library
import System;
import Externals.DOM;

// Import all your favorite JavaScript libraries in just one line.
// No need to add "type definitions" to existing libraries!
external jQuery, $, Backbone, require;

module MyApplication
{
    public void example() {
        // Nearly no learning curve.
        // You can keep writing regular JavaScript if you want.
        var x = 0, y = Math.floor(1.1);

        // The only type system in the industry that is optional and
        // "sound". In other words, if you choose to declare the type for a
        // variable, it is guaranteed to always be correct — at compile time
        // and runtime — even if you're using "untyped" JavaScript libraries!

        // This will always remain an 'int' - even at runtime
        int counter = 0;
        // This will always remain an 'unsigned int' - even at runtime
        unsigned int x = 0;
        // This will always remain an 'Employee' - even at runtime
        Employee e = new Employee();
    }

    public void unusedFunction(string unusedParam) {
        // "Dead code elimination" means only the modules, functions, and 
        // classes you actually use (and need) will end up in the
        // final generated output. No need to include an entire library
        // just to use one function!
    }
}

Develop Safer, More Reliable Web Applications

"I fell in love with JS++ at first sight."
— Eddie Dhakal

"TypeScript's 'type erasure' vs JS++'s 'type guarantee' would be a big reason to use JS++ over TypeScript."
— Andrew Osman on CodeProject

Select your platform:

You are downloading an EARLY ACCESS PREVIEW of the JS++® compiler. Several features are either incomplete or unimplemented, and you may encounter bugs.


Join JS++ Insider

We do not spam or sell/share email addresses. You can unsubscribe any time. For more information, read our privacy policy.

Thanks for joining JS++ Insider!

You'll receive an email in your inbox to confirm your email address. Please follow the link in the email.