@@ -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,20 +559,43 @@ gulp.task('test.transpiler.unittest', function(done) {
559559 runJasmineTests ( [ 'tools/transpiler/unittest/**/*.js' ] , done ) ;
560560} ) ;
561561
562-
563562// -----------------
564563// Pre/Post-test checks
565564
566565gulp . task ( 'pre-test-checks' , function ( done ) {
567566 runSequence ( 'build/checkCircularDependencies' , sequenceComplete ( done ) ) ;
568567} ) ;
569568
570-
571569gulp . task ( 'post-test-checks' , function ( done ) {
572570 runSequence ( 'enforce-format' , sequenceComplete ( done ) ) ;
573571} ) ;
574572
575573
574+ gulp . task ( '!pre.test.typings' , [ ] , function ( done ) {
575+ return gulp
576+ . src ( [
577+ 'modules/angular2/typings/**/*' ] , {
578+ base : 'modules/angular2/typings/**'
579+ }
580+ )
581+ . pipe ( gulp . dest ( 'dist/docs/typings/*' ) ) ;
582+ } ) ;
583+
584+ // -----------------
585+ // TODO: Use a version of TypeScript that matches what is used by DefinitelyTyped.
586+ gulp . task ( 'test.typings' , [ '!pre.test.typings' ] , function ( done ) {
587+ var stream = gulp . src ( [ 'typings_spec/*.ts' , 'dist/docs/typings/angular2/angular2.d.ts' ] )
588+ . pipe ( tsc ( { target : 'ES5' , module : 'commonjs' ,
589+ // Don't use the version of typescript that gulp-typescript depends on, we need 1.5
590+ // see https://github.com/ivogabe/gulp-typescript#typescript-version
591+ typescript : require ( 'typescript' ) } ) )
592+ . on ( 'error' , function ( error ) {
593+ // nodejs doesn't propagate errors from the src stream into the final stream so we are
594+ // forwarding the error into the final stream
595+ stream . emit ( 'error' , error ) ;
596+ } ) ;
597+ } ) ;
598+
576599// -----------------
577600// orchestrated targets
578601
0 commit comments