JSPM

  • Created
  • Published
  • Downloads 1040
  • Score
    100M100P100Q94101F
  • License MIT

TypeScript compiler for systemjs

Package Exports

  • plugin-typescript

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (plugin-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

plugin-typescript

build status

TypeScript compiler plugin for SystemJS

Overview

A plugin for SystemJS which enables you to System.import TypeScript files directly. The files are compiled in the browser and compilation errors written to the console.

plugin-typescript uses version 1.4 of the typescript compiler

Usage

Install plugin-typescript like this:

jspm install ts=github:frankwallis/plugin-typescript

You will then be able to import TypeScript source files like this:

System.import("./index.ts!");

Examples

To run the example project:

npm install
cd example
jspm install
gulp example

For a more complex example see here

Caveats

This plugin uses the TypeScript LanguageServices API. Unfortunately there is an issue in TypeScript 1.4.1 where const enums are not correctly output in the generated js. I'm hopeful that a fix will be released soon, meanwhile you can track the issue here.