@@ -389,7 +389,7 @@ function runKarma(configFile, done) {
389389
390390gulp . task ( 'test.js' , function ( done ) {
391391 runSequence ( 'test.unit.tools/ci' , 'test.transpiler.unittest' , 'docs/test' , 'test.unit.js/ci' ,
392- 'test.unit.cjs/ci' , sequenceComplete ( done ) ) ;
392+ 'test.unit.cjs/ci' , 'test.typings' , sequenceComplete ( done ) ) ;
393393} ) ;
394394
395395gulp . task ( 'test.dart' , function ( done ) {
@@ -559,6 +559,31 @@ gulp.task('test.transpiler.unittest', function(done) {
559559 runJasmineTests ( [ 'tools/transpiler/unittest/**/*.js' ] , done ) ;
560560} ) ;
561561
562+ gulp . task ( '!pre.test.typings' , [ ] , function ( done ) {
563+ return gulp
564+ . src ( [
565+ 'modules/angular2/typings/**/*' ] , {
566+ base : 'modules/angular2/typings/**'
567+ }
568+ )
569+ . pipe ( gulp . dest ( 'dist/docs/typings/*' ) ) ;
570+ } ) ;
571+
572+ // -----------------
573+ // TODO: Use a version of TypeScript that matches what is used by DefinitelyTyped.
574+ gulp . task ( 'test.typings' , [ '!pre.test.typings' ] , function ( done ) {
575+ var stream = gulp . src ( [ 'typings_spec/*.ts' , 'dist/docs/typings/angular2/angular2.d.ts' ] )
576+ . pipe ( tsc ( { target : 'ES5' , module : 'commonjs' ,
577+ // Don't use the version of typescript that gulp-typescript depends on, we need 1.5
578+ // see https://github.com/ivogabe/gulp-typescript#typescript-version
579+ typescript : require ( 'typescript' ) } ) )
580+ . on ( 'error' , function ( error ) {
581+ // nodejs doesn't propagate errors from the src stream into the final stream so we are
582+ // forwarding the error into the final stream
583+ stream . emit ( 'error' , error ) ;
584+ } ) ;
585+ } ) ;
586+
562587// -----------------
563588// orchestrated targets
564589
0 commit comments