BeanstalkBlue Posted February 23, 2017 Share Posted February 23, 2017 I have made a basic gulp file following Techemon's code (he uses grunt though) here: https://github.com/Temechon/Babylon.js-FPS I notice he is using babylon.2.3.d.ts. (Not 2.5 or 2.6.) With my gulp build I am able to compile my project with babylon.2.3.d.ts and everything compiles successfully. With sublime text if I build (using the official typescript sublime text plugin) with babylon.2.5.d.ts, it compiles my game.ts file successfully, no errors. But if I try to use babylon.2.5.d.ts with gulp using gulp-typescript, I get the following compilation error: node_modules/typescript/lib/lib.d.ts(5603,11): error TS2320: Interface 'AudioContext' cannot simultaneously extend types 'AudioContextBase' and 'EventTarget'. Named property 'addEventListener' of types 'AudioContextBase' and 'EventTarget' are not identical. Am I doing something wrong? Is this a bug with babylon 2.5? Does anyone have an example gulpfile.js (preferably with browserify+tsify) that compiles their TypeScript game successfully with a recent version of Babylon? I don't know if it's relevant but here is my gulpfile.js: 'use strict'; var gulp = require('gulp'); var ts = require("gulp-typescript"); var sourcemaps = require('gulp-sourcemaps'); var paths = { ts: [ 'babylon.2.5.d.ts', 'game.ts', ] }; gulp.task("ts1", function () { return gulp.src(paths.ts) .pipe( ts({ module: 'amd', target: 'es5', declaration: false, sourceMap:true, removeComments:false, out: 'dist' }) ); }); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 23, 2017 Share Posted February 23, 2017 Hello this seems to be an issue with TS compiler version Can you try with the version we use here: https://github.com/BabylonJS/Babylon.js/blob/master/Tools/Gulp/package.json ? BeanstalkBlue 1 Quote Link to comment Share on other sites More sharing options...
BeanstalkBlue Posted February 23, 2017 Author Share Posted February 23, 2017 Reverting to a lower version of typescript fixed it, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.