TypeScript/README.md
2015-11-16 20:51:48 +08:00

1.8 KiB
Raw Blame History

TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output. http://www.typescriptlang.org

📖 TypeScript手册中文版 - Published with GitBook

Beyond Handbook && Latest features

TypeScript Handbook

TypeScript Language Specification

Others

I'd love for you to contribute to the translation:)

Using Gulp with TypeScript

Install gulp and gulp-typescript. See package.json.

$ npm install --global gulp
$ npm install --save-dev gulp gulp-typescript

Config gulp. See gulpfile.js.

gulp.task('typescript', function() {
  var tsResult = gulp.src('ts/*.ts')
    .pipe(ts({
      target: 'ES5',
      declarationFiles: false,
      noExternalResolve: true
    }));

  tsResult.dts.pipe(gulp.dest('dist/tsdefinitions'));

  return tsResult.js.pipe(gulp.dest('dist/typescript'));
});