Falstaff
Falstaff

Reputation: 43

Babylon.d.ts compiled with gulp console errors

I am new to typescript and babylon.js. I downloaded the source code for the book Babylon essentials. I have a gulp file that compiles the babylon.d.ts library

var gulp = require('gulp');
var ts = require('gulp-typescript');

var files = [
"**.d.ts"
];

gulp.task("default", function() {
var result = gulp.src(files)
    .pipe(ts({ // Transcompile
        out: "compile.js" // Merge into one output file
    }));
return result.js.pipe(gulp.dest("./")); // output file destination
});

// Automatically call the "default" task when a TS file changes
gulp.task("watch", function() {
gulp.watch(files, ["default"]);
});

When I compile the library using the command gulp I get 10 console errors that say: All declarations of "error-name" must have identical modifiers.

my file structure is

-project
 -node_modules
 -gulpfile.js
 -appcompiled.js (empty)
 -app.ts (empty)
 -babylon.d.ts
 -babylon.max.js
 -index.html
 -package.json (the dep. are gulp, gulp-typescript, typescript)

What am I missing?

Upvotes: 0

Views: 154

Answers (1)

Falstaff
Falstaff

Reputation: 43

The code examples in the book babylon essentials SUCK. If someone else has this problem download the babylon.d.ts library off of git hub yourself. It will solve this problem.

Upvotes: 1

Related Questions