title: Pass .js files through gulp-typescript without ERROR TS6054
body: <p>I want to include typescript in my main gulp tool chain, so that I can convert .js files to .ts files as-needed and as time permits. It's fine if the typescript step performs no action on .js files.</p>
  
  <p>Does that make sense? If so, how can I accomplish this? I tried the following:</p>
  
  <pre><code>function compileScript(inputFiles, outputName, outputPath) {
      return r.gulp.src(inputFiles)
          .pipe(r.sourcemaps.init())
          .pipe(r.ngAnnotate())
  // I'd like to do this, but processing fails if not all files are *.ts
  //      .pipe(r.typescript({ target: 'ES5' }))
          .pipe(r.uglify())
          .pipe(r.concat(outputName))
          .pipe(r.sourcemaps.write('.'))
          .pipe(r.gulp.dest(outputPath));
  }
  </code></pre>
  
  <p>But it produces no output, citing:</p>
  
  <blockquote>
    <p>ERROR 6054: File 'script.js' must have extension '.ts' or '.d.ts'.</p>
  </blockquote>
  
  <p>Perhaps there is a typescript option that I've overlooked, or a gulp conditional pipe tool that won't break my sourcemaps? If I run two separate steps of .ts and .js files, they will end up concatenated out-of-order.</p>
  
  <p>I'd like to avoid a big-bang approach.</p>
  
  <p>p.s. I'm building an ASP.NET project in Visual Studio.</p>