Skip to content

Issue with lib setting in the tsconfig.json #196

@remojansen

Description

@remojansen

So I'm targeting ES5 but I have added support for some ES6 elements using lib in tsconfig:

{
    "compilerOptions": {
        "target": "es5",
        "lib": ["es6", "dom"],
        ...
    }
}

You can see my tsconfig.json if you need it.

I'm using typescript@rc 2.0 and this is my gulp task:

gulp.task("build-bundle-test", function() {

  var mainTsFilePath = "test/inversify.test.ts";
  var outputFolder   = "temp/";
  var outputFileName = "bundle.test.js";

  var bundler = browserify({
    debug: true,
    standalone : "inversify"
  });

  // TS compiler options are in tsconfig.json file
  return bundler.add(mainTsFilePath)
                .plugin(tsify, { typescript: require("typescript") })
                .bundle()
                .pipe(source(outputFileName))
                .pipe(buffer())
                .pipe(sourcemaps.init({ loadMaps: true }))
                .pipe(sourcemaps.write("."))
                .pipe(gulp.dest(outputFolder));
});

You can see my gulpfile.js if you need it.

I run the build in AppVeyor and is failing only in one version of node:

nodejs_version=stable

You can see all the build logs here and the failing build here.

The error is:

TypeScript error: Error TS2318: Cannot find global type 'Array'.

This maybe think that it could be related with the lib setting in the tsconfig.json file but I'm not sure.

Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions